]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
gimple-ssa-warn-access.cc: add missing auto_diagnostic_group
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
445ba599
GA
12022-06-07 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
4 style linear clause modifiers. Set
5 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
6 old style modifiers are used.
7 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
8 with val modifier on simd or for if the old style modifiers are
9 used.
10
b168441c
GA
112022-06-02 David Malcolm <dmalcolm@redhat.com>
12
13 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
14 (c_get_sarif_source_language): New.
15 * c-tree.h (c_get_sarif_source_language): New decl.
16
820ead45
GA
172022-05-31 Jason Merrill <jason@redhat.com>
18
19 * Make-lang.in (c.tags): Look at *.cc.
20
212022-05-31 Jakub Jelinek <jakub@redhat.com>
22
23 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
24 clauses.
25
37b3b5da
GA
262022-05-28 Jakub Jelinek <jakub@redhat.com>
27
28 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
29 seen first, use "%<to%>" or "%<enter%>" depending on
30 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
31 "%<to%> or %<enter%>" wording.
32
d9176e64
GA
332022-05-27 Jakub Jelinek <jakub@redhat.com>
34
35 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
36 (c_parser_omp_all_clauses): For to clause on declare target, use
37 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
38 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
39 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
40 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
41 OMP_CLAUSE_TO_DECLARE.
42 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
43 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
44 name in diagnostics instead of
45 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
46
3dff965c
GA
472022-05-25 Jakub Jelinek <jakub@redhat.com>
48
49 PR c/91134
50 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
51 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
52 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
53 diagnostic and fixit hint if DATUM has pointer type.
54 * c-parser.cc (c_parser_postfix_expression,
55 c_parser_omp_variable_list): Adjust build_component_ref callers.
56 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
57 Likewise.
58
768f49a2
GA
592022-05-24 Jakub Jelinek <jakub@redhat.com>
60
61 PR c/105378
62 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
63
1cda629f
GA
642022-05-18 Marek Polacek <polacek@redhat.com>
65
66 PR c/105131
67 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
68 mismatches.
69 * c-tree.h (comptypes_check_enum_int): Declare.
70 * c-typeck.cc (comptypes): No longer static.
71
3d9439b1
GA
722022-05-17 Marek Polacek <polacek@redhat.com>
73
74 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
75 its value.
76
772022-05-17 Jakub Jelinek <jakub@redhat.com>
78
79 * c-parser.cc (c_parser_omp_clause_depend): Parse
80 inoutset depend-kind.
81 (c_parser_omp_depobj): Likewise.
82
702bd11f
GA
832022-05-16 Martin Liska <mliska@suse.cz>
84
85 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
86
49ace834
GA
872022-05-12 Jakub Jelinek <jakub@redhat.com>
88
89 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
90 if flag_openmp.
91 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
92 in postfix expressions.
93 (c_parser_omp_variable_list): Handle omp_all_memory in depend
94 clause.
95 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
96 keyword in depend clause as null_pointer_node, diagnose invalid
97 uses.
98
bd022ff9
GA
992022-05-09 Martin Liska <mliska@suse.cz>
100
101 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
102 macros.
103 (c_parser_binary_expression): Likewise.
104
a1947c92
GA
1052022-05-07 Marek Polacek <polacek@redhat.com>
106
107 PR c++/101833
108 PR c++/47634
109 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
110
405eda0d
GA
1112022-04-08 Jakub Jelinek <jakub@redhat.com>
112
113 PR c/105149
114 * c-typeck.cc (c_build_va_arg): Reject function types.
115
a2287813
GA
1162022-03-22 Marek Polacek <polacek@redhat.com>
117
118 PR c/82283
119 PR c/84685
120 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
121 (start_init): Set it.
122 (finish_init): Restore constructor_designated.
123 (push_init_level): Set constructor_designated to the value of
124 constructor_designated in the upper constructor_stack.
125
57eeedda
GA
1262022-03-12 Thomas Schwinge <thomas@codesourcery.com>
127
128 PR other/65095
129 * c-typeck.cc (handle_omp_array_sections_1)
130 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
131 instead of 'c_omp_map_clause_name'.
132
8cc4f9cd
GA
1332022-03-09 Joseph Myers <joseph@codesourcery.com>
134
135 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
136 differently from earlier standards for unprototyped function type
137 compatibility.
138
1392022-03-09 Jakub Jelinek <jakub@redhat.com>
140
141 PR c/104711
142 * c-fold.cc (c_fully_fold_internal): Don't emit
143 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
144 * c-typeck.cc (build_binary_op): Likewise.
145
e6533e2e
GA
1462022-03-07 Jakub Jelinek <jakub@redhat.com>
147
148 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
149 literal.
150
4bf3bac1
GA
1512022-02-23 Richard Biener <rguenther@suse.de>
152
153 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
154 SSA names without definition.
155 (c_parser_gimple_declaration): Handle pointer typed SSA names.
156
0bdb0498
GA
1572022-02-17 Jakub Jelinek <jakub@redhat.com>
158
159 PR c/104532
160 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
161 convert_lvalue_to_rvalue and build_indirect_ref instead of
162 build_simple_mem_ref.
163
e8d68f0a
GA
1642022-02-11 Richard Biener <rguenther@suse.de>
165
166 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
167 VEC_COND_EXPRs.
168
a645583d
GA
1692022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
170
171 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
172 clause.
173 (c_parser_omp_variable_list): Handle array sections.
174 (c_parser_omp_clause_has_device_addr): Added.
175 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
176 case.
177 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
178 OMP_CLAUSE_MASK.
179 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
180 (c_finish_omp_clauses): Handle array sections.
181
3adf509f
GA
1822022-02-09 Jakub Jelinek <jakub@redhat.com>
183
184 PR c/104427
185 * c-parser.cc (c_parser_postfix_expression)
186 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
187 instead of build1_loc to build PAREN_EXPR.
188 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
189 * c-fold.cc (c_fully_fold_internal): Likewise.
190
fc829782
GA
1912022-01-17 Martin Liska <mliska@suse.cz>
192
193 * Make-lang.in: Rename .c names to .cc.
194 * c-convert.cc: Likewise.
195 * c-decl.cc (struct lang_identifier): Likewise.
196 (pop_scope): Likewise.
197 (finish_decl): Likewise.
198 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
199 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
200 * c-parser.h (GCC_C_PARSER_H): Likewise.
201 * c-tree.h (c_keyword_starts_typename): Likewise.
202 (finish_declspecs): Likewise.
203 (c_get_alias_set): Likewise.
204 (enum c_oracle_request): Likewise.
205 (tag_exists_p): Likewise.
206 (set_c_expr_source_range): Likewise.
207 * c-typeck.cc (c_common_type): Likewise.
208 (c_finish_omp_clauses): Likewise.
209 * config-lang.in: Likewise.
210
2112022-01-17 Martin Liska <mliska@suse.cz>
212
213 * c-aux-info.c: Moved to...
214 * c-aux-info.cc: ...here.
215 * c-convert.c: Moved to...
216 * c-convert.cc: ...here.
217 * c-decl.c: Moved to...
218 * c-decl.cc: ...here.
219 * c-errors.c: Moved to...
220 * c-errors.cc: ...here.
221 * c-fold.c: Moved to...
222 * c-fold.cc: ...here.
223 * c-lang.c: Moved to...
224 * c-lang.cc: ...here.
225 * c-objc-common.c: Moved to...
226 * c-objc-common.cc: ...here.
227 * c-parser.c: Moved to...
228 * c-parser.cc: ...here.
229 * c-typeck.c: Moved to...
230 * c-typeck.cc: ...here.
231 * gccspec.c: Moved to...
232 * gccspec.cc: ...here.
233 * gimple-parser.c: Moved to...
234 * gimple-parser.cc: ...here.
235
2362022-01-17 Andrew Stubbs <ams@codesourcery.com>
237
238 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
239
617db51d
GA
2402022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
241
242 PR c++/103705
243 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
244 outer node for ARRAY_REFs.
245
62eb5308
GA
2462022-01-01 Jakub Jelinek <jakub@redhat.com>
247
248 PR objc/103639
249 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
250 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
251
2554e2da
GA
2522021-12-17 Marek Polacek <polacek@redhat.com>
253
254 PR c/103649
255 * c-decl.c (c_warn_unused_attributes): Don't warn for
256 attribute_ignored_p.
257 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
258 arguments when the attribute is ignored.
259
9c6586bc
GA
2602021-12-14 Jakub Jelinek <jakub@redhat.com>
261
262 PR c/103587
263 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
264 consume the pragma and silently skip to the pragma eol.
265
c8dcf64b
GA
2662021-12-12 Jonathan Wakely <jwakely@redhat.com>
267
268 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
269 * c-parser.c: Likewise.
270
4b4839e3
GA
2712021-12-09 Jakub Jelinek <jakub@redhat.com>
272
273 PR pch/71934
274 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
275 to resort_data.new_value.
276
641ff219
GA
2772021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
278
279 * c-parser.c (struct omp_dim): New struct type for use inside
280 c_parser_omp_variable_list.
281 (c_parser_omp_variable_list): Allow multiple levels of array and
282 component accesses in array section base-pointer expression.
283 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
284 c_parser_omp_var_list_parens.
285 (c_parser_omp_clause_from): Likewise.
286 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
287 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
288 POINTER_PLUS_EXPR.
289 (c_finish_omp_clauses): Extend allowed ranged of expressions
290 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
291
2922021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
293
294 PR middle-end/92120
295 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
296 call to c_parser_omp_variable_list to 'true'.
297 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
298 array base handling.
299 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
300
c177e806
GA
3012021-11-30 Thomas Schwinge <thomas@codesourcery.com>
302
303 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
304 orphan loop" checking.
305
3062021-11-30 Cesar Philippidis <cesar@codesourcery.com>
307 Thomas Schwinge <thomas@codesourcery.com>
308
309 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
310 OpenACC gang reductions.
311
3122021-11-30 Richard Biener <rguenther@suse.de>
313
314 * gimple-parser.c (c_parser_gimple_postfix_expression):
315 avoid unreachable code after break.
316
87cd82c8
GA
3172021-11-29 Eric Gallager <egallager@gcc.gnu.org>
318
319 PR other/103021
320 * Make-lang.in: Use ETAGS variable in TAGS target.
321
3222021-11-29 Richard Biener <rguenther@suse.de>
323
324 * c-typeck.c (c_tree_equal): Remove unreachable return.
325 * c-parser.c (get_matching_symbol): Likewise.
326
e1d43592
GA
3272021-11-23 Jakub Jelinek <jakub@redhat.com>
328
329 * c-typeck.c (c_clone_omp_udr): Don't initialize
330 id.transform_lang_insert_block.
331
9c077398
GA
3322021-11-19 Martin Sebor <msebor@redhat.com>
333
334 PR c++/33925
335 PR c/102867
336 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
337 code resulting from macro expansion.
338
3392021-11-19 Martin Liska <mliska@suse.cz>
340
341 Revert:
342 2021-11-19 Martin Liska <mliska@suse.cz>
343
344 * c-parser.c (add_debug_begin_stmt): Use option directly.
345
483092d3
GA
3462021-11-18 Matthias Kretz <m.kretz@gsi.de>
347
348 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
349 * c-parser.c (c_parser_postfix_expression): Likewise.
350
3512021-11-18 Martin Liska <mliska@suse.cz>
352
353 * c-parser.c (add_debug_begin_stmt): Use option directly.
354
280d2838
GA
3552021-11-17 Martin Sebor <msebor@redhat.com>
356
357 PR c/101702
358 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
359 bounds before deciding if they're constant.
360
e2b57363
GA
3612021-11-15 Jakub Jelinek <jakub@redhat.com>
362
363 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
364 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
365
b39265d4
GA
3662021-11-11 Jakub Jelinek <jakub@redhat.com>
367
368 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
369 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
370 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
371 OMP_CLAUSE_NUM_TEAMS_EXPR.
372 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
373 combined target teams even lower-bound expression.
374
3752021-11-11 Richard Biener <rguenther@suse.de>
376
377 * gimple-parser.c: Shuffle bitmap.h include.
378
18ae471f
GA
3792021-11-03 Joseph Myers <joseph@codesourcery.com>
380
381 PR c/103031
382 * c-convert.c (c_convert): New function, based on convert.
383 (convert): Make into wrapper of c_convert.
384 (convert_init): New function.
385 * c-typeck.c (enum impl_conv): Add ic_init_const.
386 (convert_for_assignment): Handle ic_init_const like ic_init. Add
387 new argument to convert_and_check call.
388 (digest_init): Pass ic_init_const to convert_for_assignment for
389 initializers required to be constant.
390
b4df2dd3
GA
3912021-11-02 Richard Sandiford <richard.sandiford@arm.com>
392
393 * c-tree.h (c_simulate_record_decl): Declare.
394 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
395 * c-decl.c (c_simulate_record_decl): New function.
396
c2bd5d8a
GA
3972021-10-22 Eric Gallager <egallager@gcc.gnu.org>
398
399 PR other/102663
400 * Make-lang.in: Add dummy c.install-dvi target.
401
93d183a5
GA
4022021-10-15 Richard Biener <rguenther@suse.de>
403
404 PR c/102763
405 * gimple-parser.c
406 (c_parser_gimple_postfix_expression_after_primary): Check
407 for a pointer do be dereferenced by ->.
408
5d5885c9
GA
4092021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
410
411 * c-parser.c (c_finish_omp_declare_variant): Change call from
412 c_omp_check_context_selector to omp_check_context_selector. Change
413 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
414
c9db17b8
GA
4152021-10-09 Jakub Jelinek <jakub@redhat.com>
416
417 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
418 (c_parser_omp_scan_loop_body): Use it.
419 (c_parser_omp_sections_scope): Likewise.
420
50e20ee6
GA
4212021-10-07 Richard Biener <rguenther@suse.de>
422
423 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
424
bb6194e0
GA
4252021-10-05 Richard Biener <rguenther@suse.de>
426
427 PR c/102605
428 * gimple-parser.c (c_parser_gimple_postfix_expression):
429 Accept more address _Literals.
430
da9c5f78
GA
4312021-10-04 Marek Polacek <polacek@redhat.com>
432
433 PR c++/97573
434 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
435
9d116bcc
GA
4362021-10-01 Martin Sebor <msebor@redhat.com>
437
438 PR c/102103
439 * c-typeck.c (maybe_warn_for_null_address): New function.
440 (build_binary_op): Call it.
441
4422021-10-01 Jakub Jelinek <jakub@redhat.com>
443 Richard Biener <rguenther@suse.de>
444
445 PR sanitizer/102515
446 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
447 for division even for SANITIZE_SI_OVERFLOW.
448
4492021-10-01 Jakub Jelinek <jakub@redhat.com>
450
451 * c-parser.c (c_parser_omp_clause_order): Set
452 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
453
fd133479
GA
4542021-09-28 Andrew Pinski <apinski@marvell.com>
455
456 PR c/32122
457 * c-parser.c (c_parser_statement_after_labels): Pass
458 the c_expr instead of the tree to c_finish_goto_ptr.
459 * c-typeck.c (c_finish_goto_ptr): Change the second
460 argument type to c_expr.
461 * c-tree.h (c_finish_goto_ptr): Likewise.
462 Error out if the expression was not of a pointer type.
463
e4777439
GA
4642021-09-22 Jakub Jelinek <jakub@redhat.com>
465
466 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
467 modifiers.
468
cf74e7b5
GA
4692021-09-18 Jakub Jelinek <jakub@redhat.com>
470
471 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
472 and reproducible modifiers.
473 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
474
4752021-09-18 Jakub Jelinek <jakub@redhat.com>
476
477 * c-parser.c (c_parser_omp_clause_default): Handle private and
478 firstprivate arguments, adjust diagnostics on unknown argument.
479
0a4cb439
GA
4802021-09-17 Jakub Jelinek <jakub@redhat.com>
481
482 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
483 is true.
484
a26206ec
GA
4852021-09-10 Jakub Jelinek <jakub@redhat.com>
486
487 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
488 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
489 don't call build_conditional_expr, instead build a COND_EXPR directly.
490 (c_parser_binary_expression): Avoid calling parser_build_binary_op
491 if omp_atomic_lhs even in more cases for >, < or ==.
492 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
493 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
494 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
495 * c-typeck.c (build_binary_op): For flag_openmp only handle
496 MIN_EXPR/MAX_EXPR.
497
b2748138
GA
4982021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
499
500 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
501 directive.
502
e11c6046
GA
5032021-09-01 Iain Sandoe <iain@sandoe.co.uk>
504
505 * c-decl.c (enum deprecated_states): Add unavailable state.
506 (merge_decls): Copy unavailability.
507 (quals_from_declspecs): Handle unavailable case.
508 (start_decl): Amend the logic handling suppression of nested
509 deprecation states to include unavailability.
510 (smallest_type_quals_location): Amend comment.
511 (grokdeclarator): Handle the unavailable deprecation state.
512 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
513 * c-tree.h (struct c_declspecs): Add unavailable_p.
514 * c-typeck.c (build_component_ref): Handle unavailability.
515 (build_external_ref): Likewise.
516
5172021-09-01 Roger Sayle <roger@nextmovesoftware.com>
518 Joseph Myers <joseph@codesourcery.com>
519
520 PR c/79412
521 * c-decl.c (duplicate_decls): On significant mismatches, mark the
522 types of both (non-function) decls as error_mark_node, so that the
523 middle-end can see the code is malformed.
524 (free_attr_access_data): Don't process if the type has been set to
525 error_mark_node.
526
6d51ee43
GA
5272021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
528
529 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
530 and 'ancestor' in 'target device' clauses.
531
38b19c5b
GA
5322021-08-23 Jakub Jelinek <jakub@redhat.com>
533
534 * c-parser.c (c_parser_omp_clause_num_tasks,
535 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
536
5b2876f9
GA
5372021-08-22 Martin Uecker <muecker@gwdg.de>
538
539 PR c/98397
540 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
541 for pointers to arrays with qualifiers.
542 (build_conditional_expr): For C23 don't lose qualifiers for pointers
543 to arrays when the other pointer is a void pointer. Update warnings.
544 (convert_for_assignment): Update warnings for C2X when converting from
545 void* with qualifiers to a pointer to array with the same qualifiers.
546
7c9e1645
GA
5472021-08-20 Jakub Jelinek <jakub@redhat.com>
548
549 * c-parser.c (c_parser_omp_error): New function.
550 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
551
5522021-08-20 Jakub Jelinek <jakub@redhat.com>
553
554 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
555 comma at the end of list.
556 (c_parser_omp_requires): Likewise.
557
b57fba5e
GA
5582021-08-19 Jakub Jelinek <jakub@redhat.com>
559
560 * c-parser.c (c_parser_omp_requires): Don't call
561 c_parser_peek_2nd_token and optionally consume token if current
562 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
563
6e529985
GA
5642021-08-18 Jakub Jelinek <jakub@redhat.com>
565
566 * c-parser.c (c_parser_omp_nothing): New function.
567 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
568
5692021-08-18 Jakub Jelinek <jakub@redhat.com>
570
571 * c-parser.c (c_parser_statement_after_labels): Add restart label
572 near the start of the function. If c_parser_pragma returns false,
573 goto restart.
574 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
575 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
576 return what c_parser_omp_declare returned. Return true instead of
577 false after emitting errors that the directive is not allowed in
578 pragma_stmt context.
579 (c_parser_omp_ordered): Return true instead of
580 false after emitting errors that the directive is not allowed in
581 pragma_stmt context.
582 (c_parser_omp_target_update): Likewise.
583 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
584 Change return type from tree to bool, return false if the
585 directive should be ignored in pragma_stmt contexts.
586 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
587 return their result directly.
588 (c_parser_omp_cancellation_point): Change return type from void to
589 bool, return false if the directive should be ignored in pragma_stmt
590 contexts.
591 (c_parser_omp_declare): Likewise.
592
2d14d64b
GA
5932021-08-17 Jakub Jelinek <jakub@redhat.com>
594
595 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
596 (c_parser_omp_scope): New function.
597 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
598
72be20e2
GA
5992021-08-12 Jakub Jelinek <jakub@redhat.com>
600
601 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
602 (c_parser_omp_clause_filter): New function.
603 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
604 (OMP_MASKED_CLAUSE_MASK): Define.
605 (c_parser_omp_masked): New function.
606 (c_parser_omp_parallel): Handle parallel masked.
607 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
608 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
609
6102021-08-12 Martin Uecker <muecker@gwdg.de>
611
612 PR c/101838
613 PR c/29970
614 * c-typeck.c (c_expr_sizeof_type): Evaluate
615 size expressions for structs of variable size.
616
6172021-08-12 Tobias Burnus <tobias@codesourcery.com>
618
619 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
620 'primary' as alias for 'master'.
621
3ae564ea
GA
6222021-08-10 Martin Uecker <muecker@gwdg.de>
623
624 PR c/29970
625 * c-typeck.c (c_expr_sizeof_expr): Evaluate
626 size expressions for structs of variable size.
627
f92f4778
GA
6282021-08-06 Tamar Christina <tamar.christina@arm.com>
629
630 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
631 * c-tree.h (c_simulate_enum_decl): Likewise.
632
6332021-08-06 Martin Sebor <msebor@redhat.com>
634
635 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
636 vec arguments to by-reference.
637 (c_finish_omp_declare_simd): Same.
638 (c_parser_compound_statement_nostart): Same.
639 (c_parser_for_statement): Same.
640 (c_parser_objc_methodprotolist): Same.
641 (c_parser_oacc_routine): Same.
642 (c_parser_omp_for_loop): Same.
643 (c_parser_omp_declare_simd): Same.
644
419c6c68
GA
6452021-07-21 Thomas Schwinge <thomas@codesourcery.com>
646 Joseph Myers <joseph@codesourcery.com>
647 Cesar Philippidis <cesar@codesourcery.com>
648
649 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
650 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
651 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
652 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
653
92d45509
GA
6542021-07-20 Martin Sebor <msebor@redhat.com>
655
656 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
657 by-const-reference.
658 * c-typeck.c (c_build_function_call_vec): Same.
659
d97d71a1
GA
6602021-07-15 Martin Sebor <msebor@redhat.com>
661
662 PR c/101289
663 PR c/97548
664 * c-decl.c (get_parm_array_spec): Strip nops.
665
6fba0eea
GA
6662021-07-06 Martin Sebor <msebor@redhat.com>
667
668 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
669
7a60a6e8
GA
6702021-07-02 Jakub Jelinek <jakub@redhat.com>
671
672 PR c/101297
673 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
674 appears before a CPP_NAME.
675
90708f87
GA
6762021-06-25 Martin Sebor <msebor@redhat.com>
677
678 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
679 warning_suppressed_p, suppress_warning, and copy_no_warning.
680 (diagnose_mismatched_decls): Same.
681 (duplicate_decls): Same.
682 (grokdeclarator): Same.
683 (finish_function): Same.
684 (c_write_global_declarations_1): Same.
685 * c-fold.c (c_fully_fold_internal): Same.
686 * c-parser.c (c_parser_expr_no_commas): Same.
687 (c_parser_postfix_expression): Same.
688 * c-typeck.c (array_to_pointer_conversion): Same.
689 (function_to_pointer_conversion): Same.
690 (default_function_array_conversion): Same.
691 (convert_lvalue_to_rvalue): Same.
692 (default_conversion): Same.
693 (build_indirect_ref): Same.
694 (build_function_call_vec): Same.
695 (build_atomic_assign): Same.
696 (build_unary_op): Same.
697 (c_finish_return): Same.
698 (emit_side_effect_warnings): Same.
699 (c_finish_stmt_expr): Same.
700 (c_omp_clause_copy_ctor): Same.
701
9aa8327e
GA
7022021-06-24 Jakub Jelinek <jakub@redhat.com>
703
704 PR c/101176
705 * c-parser.c (c_parser_has_attribute_expression): Set source range for
706 the result.
707
7082021-06-24 Jakub Jelinek <jakub@redhat.com>
709
710 PR c/101171
711 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
712 error_mark_node.
713
7142021-06-24 Jakub Jelinek <jakub@redhat.com>
715
716 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
717 C_ORT_OMP for clauses on target construct.
718 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
719 (c_parser_omp_target): For non-combined target add
720 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
721 C_ORT_OMP_TARGET to c_finish_omp_clauses.
722 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
723 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
724 never present on C_ORT_*DECLARE_SIMD.
725 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
726 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
727 corresponding map clauses.
728
2f080224
GA
7292021-06-21 Jakub Jelinek <jakub@redhat.com>
730
731 PR inline-asm/100785
732 * c-typeck.c (c_mark_addressable): Diagnose trying to make
733 bit-fields addressable.
734
ede6c356
GA
7352021-06-15 Robin Dapp <rdapp@linux.ibm.com>
736
737 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
738 similar.
739
8dc48181
GA
7402021-06-14 Tobias Burnus <tobias@codesourcery.com>
741
742 PR c/100913
743 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
744 var in the error case.
745
438aac59
GA
7462021-06-07 Eric Botcazou <ebotcazou@adacore.com>
747
748 PR c/100920
749 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
750 spot built-in functions.
751
7d6987e9
GA
7522021-06-06 Jakub Jelinek <jakub@redhat.com>
753
754 PR c/100902
755 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
756 even when target is combined with other constructs.
757
7582021-06-06 Eric Botcazou <ebotcazou@adacore.com>
759
760 PR c/100920
761 * c-decl.c (finish_struct): Fix thinko in previous change.
762 * c-typeck.c (convert_for_assignment): Do not warn on pointer
763 assignment and initialization for storage order purposes if the
764 RHS is a call to a DECL_IS_MALLOC function.
765
600f90cb
GA
7662021-06-04 Martin Sebor <msebor@redhat.com>
767
768 PR c/100783
769 * c-objc-common.c (print_type): Handle erroneous types.
770
440c8a0a
GA
7712021-06-03 Jakub Jelinek <jakub@redhat.com>
772
773 PR c++/100859
774 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
775 after depend only cases.
776
ee682192
GA
7772021-05-31 Richard Biener <rguenther@suse.de>
778
779 PR c++/88601
780 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
781 * c-parser.c (c_parser_postfix_expression): Likewise.
782
48166757
GA
7832021-05-28 Richard Biener <rguenther@suse.de>
784
785 PR c/100803
786 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
787 invalid if conditions.
788
7892021-05-28 Jakub Jelinek <jakub@redhat.com>
790
791 PR middle-end/99928
792 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
793 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
794 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
795 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
796 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
797 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
798 if present in map_head, map_field_head or map_firstprivate_head
799 bitmaps.
800
8012021-05-28 Tobias Burnus <tobias@codesourcery.com>
802
803 * c-parser.c (c_parser_omp_clause_affinity): New.
804 (c_parser_omp_clause_name, c_parser_omp_variable_list,
805 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
806 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
807 c_finish_omp_clauses): Likewise.
808
01c59ef2
GA
8092021-05-26 Eric Botcazou <ebotcazou@adacore.com>
810
811 PR c/100653
812 * c-decl.c (finish_struct): Warn for a union containing an aggregate
813 field with a differing scalar storage order.
814
2832d51b
GA
8152021-05-21 Jakub Jelinek <jakub@redhat.com>
816
817 PR middle-end/99928
818 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
819 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
820 if a decl is mentioned both in map clause and in such firstprivate
821 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
822
65f32e5d
GA
8232021-05-19 Jakub Jelinek <jakub@redhat.com>
824
825 PR middle-end/99928
826 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
827 master when combined with taskloop.
828 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
829 parallel master when not combined with taskloop.
830
a8daf9a1
GA
8312021-05-18 Richard Biener <rguenther@suse.de>
832
833 PR c/100522
834 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
835 Diagnose calls to non-functions.
836 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
837
a7ffc1ef
GA
8382021-05-17 Richard Biener <rguenther@suse.de>
839
840 PR c/100625
841 * gimple-parser.c (c_parser_gimple_label): Avoid building
842 a GIMPLE label with NULL label decl.
843
f9af11c7
GA
8442021-05-13 Martin Sebor <msebor@redhat.com>
845
846 PR c/100550
847 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
848
0ff3a0f2
GA
8492021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
850
851 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
852 'close'.
853
aa891c56
GA
8542021-05-10 Martin Liska <mliska@suse.cz>
855
856 * c-aux-info.c (affix_data_type): Use startswith
857 function instead of strncmp.
858 * c-typeck.c (build_function_call_vec): Likewise.
859 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
860
62d87a32
GA
8612021-05-07 Eric Botcazou <ebotcazou@adacore.com>
862
863 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
864 on the address of a pointer field in a record with reverse SSO.
865
99e8df7a
GA
8662021-05-04 Tobias Burnus <tobias@codesourcery.com>
867
868 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
869 for || and && reductions.
870
3c8e539d
GA
8712021-04-29 Joseph Myers <joseph@codesourcery.com>
872
873 * c-typeck.c (function_types_compatible_p): For C2X, treat
874 unprototyped function as compatible with non-variadic prototyped
875 function even if some argument types are changed by the default
876 argument promotions.
877
ee351f7f
GA
8782021-04-15 Martin Sebor <msebor@redhat.com>
879
880 PR c/99420
881 PR c/99972
882 * c-decl.c (pushdecl): Always propagate type attribute.
883
8842021-04-15 Richard Sandiford <richard.sandiford@arm.com>
885
886 PR c/98852
887 * c-typeck.c (c_common_type): Do not drop attributes that
888 affect type identity.
889
1d54b138
GA
8902021-04-10 Jakub Jelinek <jakub@redhat.com>
891
892 PR c/99990
893 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
894 error_mark_node.
895
4493b1c1
GA
8962021-03-25 Jakub Jelinek <jakub@redhat.com>
897
898 PR c++/99565
899 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
900 to operand_equal_p.
901
5f256a70
GA
9022021-03-19 Jakub Jelinek <jakub@redhat.com>
903
904 PR c/99588
905 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
906 with modifycode NOP_EXPR produces and mark the _Atomic var as read
907 if found.
908 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
909 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
910 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
911
3c5b6d24
GA
9122021-03-15 Tobias Burnus <tobias@codesourcery.com>
913
914 PR c++/99509
915 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
916 ensure that the varpool node is marked as offloadable.
917
ceae9533
GA
9182021-03-05 Tobias Burnus <tobias@codesourcery.com>
919
920 PR c/99137
921 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
922
4028d01a
GA
9232021-02-24 Martin Sebor <msebor@redhat.com>
924
925 PR middle-end/97172
926 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
927
bf81237e
GA
9282021-02-18 Jakub Jelinek <jakub@redhat.com>
929
930 PR c/99136
931 * c-typeck.c (c_finish_return): Don't wrap retval into
932 EXCESS_PRECISION_EXPR in functions that return void.
933
0c5cdb31
GA
9342021-02-11 Marek Polacek <polacek@redhat.com>
935
936 * c-parser.c (c_parser_if_statement): Use vec_free.
937
a19dd5e6
GA
9382021-02-04 Martin Sebor <msebor@redhat.com>
939
940 PR c/97882
941 * c-decl.c (locate_old_decl): Add type to diagnostic output.
942 (diagnose_mismatched_decls): Same.
943 (start_function): Introduce temporaries for better readability.
944 * c-typeck.c (comptypes_internal): Only consider complete enum
945 types in comparisons with integers.
946
f7884fb1
GA
9472021-02-01 Martin Sebor <msebor@redhat.com>
948
949 PR middle-end/97172
950 * c-decl.c (free_attr_access_data): New function.
951 (c_parse_final_cleanups): Call free_attr_access_data.
952
59cf67d1
GA
9532021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
954
955 * c-parser.c (c_parser_omp_clause_detach): New.
956 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
957 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
958 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
959 clause. Prevent use of detach with mergeable and overriding the
960 data sharing mode of the event handle.
961
2f7f0d32
GA
9622021-01-15 Jakub Jelinek <jakub@redhat.com>
963
964 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
965 unqualified element type and then call c_build_qualified_type on the
966 ARRAY_TYPE.
967
7d187e4f
GA
9682021-01-07 Richard Biener <rguenther@suse.de>
969
970 * gimple-parser.c (c_parser_gimple_compound_statement): Only
971 reallocate loop array if it is too small.
972
eefe499f
GA
9732020-12-16 Martin Uecker <muecker@gwdg.de>
974
975 PR c/98047
976 * c-typeck.c (build_modify_expr): Drop qualifiers.
977
9782020-12-16 Martin Uecker <muecker@gwdg.de>
979
980 PR c/98260
981 * c-parser.c (c_parser_expression): Look into
982 nop expression when marking expressions as read.
983
d52945ce
GA
9842020-12-14 Martin Liska <mliska@suse.cz>
985
986 PR sanitizer/98204
987 * c-typeck.c (pointer_diff): Do not emit a top-level
988 sanitization.
989 (build_binary_op): Likewise.
990
ca2bd949
GA
9912020-12-09 Tobias Burnus <tobias@codesourcery.com>
992
993 * c-parser.c (c_parser_omp_allocate): New.
994 (c_parser_omp_construct): Call it.
995
9962020-12-09 Richard Biener <rguenther@suse.de>
997
998 PR c/98200
999 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1000 early on error.
1001
bc8a7013
GA
10022020-12-07 Martin Uecker <muecker@gwdg.de>
1003
1004 PR c/97981
1005 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1006 that drops qualifiers to the end of the function.
1007
d48df6f2
GA
10082020-11-26 Martin Uecker <muecker@gwdg.de>
1009
1010 PR c/65455
1011 PR c/92935
1012 * c-parser.c (c_parser_declaration_or_fndef): Remove
1013 redundant code to drop qualifiers of _Atomic types for __auto_type.
1014 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1015 types for __typeof__.
1016
1e2c9a27
GA
10172020-11-24 Jakub Jelinek <jakub@redhat.com>
1018
1019 PR c/97958
1020 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1021 expressions, use make_node instead of build2 to avoid checking build2
1022 performs.
1023
8e6198d0
GA
10242020-11-23 Joseph Myers <joseph@codesourcery.com>
1025
1026 PR c/95630
1027 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1028 for comparisons of complete and incomplete pointers.
1029
7a97e2fc
GA
10302020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1031
1032 * c-aux-info.c (gen_type): Support opaque types.
1033
82e5048e
GA
10342020-11-20 Martin Sebor <msebor@redhat.com>
1035
1036 PR middle-end/97879
1037 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1038
10392020-11-20 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR other/97911
1042 * Make-lang.in (c.serial): Change from goal to a variable.
1043 (.PHONY): Drop c.serial.
1044
10452020-11-20 Martin Uecker <muecker@gwdg.de>
1046
1047 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1048
d62586ee
GA
10492020-11-19 Jakub Jelinek <jakub@redhat.com>
1050
1051 PR c/97860
1052 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1053 error_operand_p.
1054
25bb75f8
GA
10552020-11-18 Jakub Jelinek <jakub@redhat.com>
1056
1057 * Make-lang.in (c.serial): New goal.
1058 (.PHONY): Add c.serial c.prev.
1059 (cc1$(exeext)): Call LINK_PROGRESS.
1060
77f67db2
GA
10612020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1062
1063 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1064 goto too.
1065 * c-typeck.c (build_asm_expr): Remove an assert checking output
1066 absence for asm goto.
1067
10682020-11-13 Jakub Jelinek <jakub@redhat.com>
1069
1070 * c-typeck.c (c_finish_omp_clauses): Don't clear
1071 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1072
10732020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1074
1075 PR objc/77404
1076 * c-parser.c (c_parser_objc_class_definition): Pass the
1077 location of the class name to the interface declaration.
1078
bb622641
GA
10792020-11-10 Strager Neds <strager.nds@gmail.com>
1080
1081 * c-decl.c (merge_decls): Use new overload of
1082 set_decl_section_name.
1083
10842020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1085
1086 * c-parser.c (c_parser_omp_target_data): Add use of
1087 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1088 handled map clause kind.
1089 (c_parser_omp_target_enter_data): Likewise.
1090 (c_parser_omp_target_exit_data): Likewise.
1091 (c_parser_omp_target): Likewise.
1092 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1093 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1094 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1095 same struct field access to co-exist on OpenMP construct.
1096
2da7ee05
GA
10972020-11-07 Martin Uecker <muecker@gwdg.de>
1098
1099 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1100 (c_parser_all_labels): Likewise.
1101
44cab2d8
GA
11022020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1103
1104 * c-parser.c (c_parser_objc_at_property_declaration):
1105 Improve parsing fidelity. Associate better location info
1106 with @property attributes. Clean up the interface to
1107 objc_add_property_declaration ().
1108
11092020-11-06 Nathan Sidwell <nathan@acm.org>
1110
1111 * c-decl.c (diagnose_mismatched_decls): Rename
1112 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1113 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1114 (collect_source_refs): Likewise.
1115 * c-typeck.c (inform_declaration, inform_for_arg)
1116 (convert_for_assignment): Likewise.
1117
11182020-11-06 Tobias Burnus <tobias@codesourcery.com>
1119
1120 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1121 OpenACC matching.
1122 (c_parser_omp_construct): Update call.
1123
35c125cb
GA
11242020-11-04 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c++/97670
1127 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1128 find underlying decl to clear in the aligned_head bitmap.
1129
11302020-11-04 Joseph Myers <joseph@codesourcery.com>
1131
1132 * c-decl.c (handle_nodiscard_attribute): New.
1133 (std_attribute_table): Add nodiscard.
1134 * c-parser.c (c_parser_std_attribute): Expect argument to
1135 nodiscard attribute to be a string. Do not special-case ignoring
1136 nodiscard.
1137 * c-typeck.c (maybe_warn_nodiscard): New.
1138 (build_compound_expr, emit_side_effect_warnings): Call
1139 maybe_warn_nodiscard.
1140 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1141 emit_side_effect_warnings if warn_unused_result.
1142
4f0606fe
GA
11432020-10-29 Asher Gordon <AsDaGo@posteo.net>
1144
1145 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1146 with XDELETE.
1147 (finish_init): Likewise.
1148 (pop_init_level): Likewise.
1149
e93aae4a
GA
11502020-10-28 Joseph Myers <joseph@codesourcery.com>
1151
1152 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1153 error_at for omitted parameter name.
1154
11552020-10-28 Jakub Jelinek <jakub@redhat.com>
1156
1157 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1158 (c_parser_omp_clause_allocate): New function.
1159 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1160 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1161 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1162 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1163 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1164 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1165 PRAGMA_OMP_CLAUSE_ALLOCATE.
1166 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1167
89bb01e7
GA
11682020-10-27 Joseph Myers <joseph@codesourcery.com>
1169
1170 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1171 standard attributes.
1172
efe71fcc
GA
11732020-10-23 Marek Polacek <polacek@redhat.com>
1174
1175 PR c++/91741
1176 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1177 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1178 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1179 * c-tree.h (char_type_p): Declare.
1180 * c-typeck.c (char_type_p): No longer static.
1181
11822020-10-23 Martin Sebor <msebor@redhat.com>
1183
1184 PR middle-end/97552
1185 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1186
2fe5b7d1
GA
11872020-09-19 Martin Sebor <msebor@redhat.com>
1188
1189 PR c/50584
1190 * c-decl.c (lookup_last_decl): Define new function.
1191 (c_decl_attributes): Call it.
1192 (start_decl): Add argument and use it.
1193 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1194 (get_parm_array_spec): Define new function.
1195 (push_parm_decl): Call get_parm_array_spec.
1196 (start_function): Call warn_parm_array_mismatch. Build attribute
1197 access and add it to current function.
1198 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1199 in forms of array parameters.
1200 * c-tree.h (start_decl): Add argument.
1201
12022020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1203
1204 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1205 with...
1206 (in_statement): New.
1207 (start_function): Adjust for above change.
1208 (c_push_function_context, c_pop_function_context): Likewise.
1209 * c-lang.h (struct language_function): Likewise.
1210 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1211 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1212 New.
1213 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1214 (c_parser_switch_statement): Adjust break/switch context handling
1215 and calls to renamed functions.
1216 (c_parser_while_statement): Adjust break/switch context handling and
1217 build a WHILE_STMT.
1218 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1219 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1220 (c_parser_omp_for_loop): Adjust break/switch context handling.
1221 * c-tree.h (c_break_label, c_cont_label): Delete.
1222 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1223 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1224 (in_statement, switch_statement_break_seen_p): Declare.
1225 (c_start_case, c_finish_case): Renamed to...
1226 (c_start_switch, c_finish_switch).
1227 (c_finish_bc_stmt): Adjust arguments.
1228 * c-typeck.c (build_function_call_vec): Don't try to print
1229 statements with %qE format.
1230 (struct c_switch): Rename switch_expr field to switch_stmt.
1231 Add break_stmt_seen_p field.
1232 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1233 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1234 (do_case): Update for changes to struct c_switch.
1235 (c_finish_case): Rename to c_finish_switch. Update for changes to
1236 struct c_switch and change of representation from SWITCH_EXPR to
1237 SWITCH_STMT.
1238 (c_finish_loop): Delete.
1239 (c_finish_bc_stmt): Update to reflect changes to break/continue
1240 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1241 of a GOTO_EXPR except for objc foreach loops.
1242
e1a4a8a0
GA
12432020-09-01 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR c++/96867
1246 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1247 only on PARM_DECLs.
1248
8f7ea26a
GA
12492020-08-28 Martin Sebor <msebor@redhat.com>
1250
1251 PR c/96596
1252 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1253 argument type.
1254
8b394f01
GA
12552020-08-27 Martin Liska <mliska@suse.cz>
1256
1257 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1258 growth function to true.
1259
db0f6efe
GA
12602020-08-25 Tobias Burnus <tobias@codesourcery.com>
1261
1262 PR c/96678
1263 * c-typeck.c (handle_omp_array_sections_1): Talk about
1264 array function parameter in the error message.
1265
5c265693
GA
12662020-08-18 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR c/96571
1269 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1270 to int, holding index of the match. Call mark_exp_read on the selector
1271 expression and on expressions other than the selected one.
1272
4967ca2f
GA
12732020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1274
1275 PR c/96377
1276 * c-typeck.c (process_init_element): Split test for whether to
1277 recurse into a record, union or array into...
1278 (initialize_elementwise_p): ...this new function. Don't recurse
1279 into a vector type if the initialization value is also a vector.
1280
48cc2e46
GA
12812020-07-31 Richard Biener <rguenther@suse.de>
1282
1283 PR debug/96383
1284 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1285 Define to c_common_finalize_early_debug.
1286
3ea9abca
GA
12872020-07-22 Tobias Burnus <tobias@codesourcery.com>
1288
1289 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1290 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1291 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1292
30430061
GA
12932020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1294
1295 PR target/95237
1296 * c-decl.c (finish_decl): Call target hook
1297 lower_local_decl_alignment to lower local decl alignment.
1298
3f8ca9cb
GA
12992020-07-09 Julian Brown <julian@codesourcery.com>
1300 Thomas Schwinge <thomas@codesourcery.com>
1301
1302 PR middle-end/95270
1303 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1304 for standalone attach/detach clauses.
1305
a82c4c4c 13062020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1307
1308 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1309 set, warn for conversion between pointers that point to incompatible
1310 scalar storage orders.
1311
f60ee68d
GA
13122020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1313
1314 * c-parser.c (c_parser_statement_after_labels): Pass correct
1315 parameters to c_parser_do_statement.
1316
56638b9b
GA
13172020-06-16 Jakub Jelinek <jakub@redhat.com>
1318
1319 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1320 c_in_omp_for.
1321 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1322 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1323 c_finish_omp_for.
1324 * c-tree.h (c_in_omp_for): Declare.
1325 * c-typeck.c (c_in_omp_for): Define.
1326 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1327 (digest_init): Likewise.
1328 (build_binary_op): Likewise.
1329
13302020-06-16 Jakub Jelinek <jakub@redhat.com>
1331
1332 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1333 from kind by comma rather than colon.
1334
1a59f3db
GA
13352020-06-05 Mark Wielaard <mark@klomp.org>
1336
1337 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1338 an undeclared builtin, then add a fixit header hint, if found.
1339 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1340 warning_at about implicit builtin declaration type mismatch.
1341
9a5b7438
GA
13422020-06-03 Mark Wielaard <mark@klomp.org>
1343
1344 * c-parser.c (struct c_parser): Add seen_string_literal
1345 bitfield.
1346 (c_parser_consume_token): Reset seen_string_literal.
1347 (c_parser_error_richloc): Add name_hint if seen_string_literal
1348 and next token is a CPP_NAME and we have a missing header
1349 suggestion for the name.
1350 (c_parser_string_literal): Set seen_string_literal.
1351
13522020-06-03 Mark Wielaard <mark@klomp.org>
1353
1354 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1355 scope with matching_parens after CPP_OPEN_PAREN.
1356
13572020-06-03 Tobias Burnus <tobias@codesourcery.com>
1358
1359 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1360
53ffb43a
GA
13612020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1362
1363 * Make-lang.in: Remove extra slash.
1364
8f66f175
ML
13652020-05-19 Martin Liska <mliska@suse.cz>
1366
1367 * c-parser.c: Fix typo.
1368
49ddde69
JJ
13692020-05-14 Jakub Jelinek <jakub@redhat.com>
1370
1371 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1372
eb72dc66
RB
13732020-05-07 Richard Biener <rguenther@suse.de>
1374
1375 PR middle-end/94703
1376 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1377 DECL_GIMPLE_REG_P.
1378
bf915591
JJ
13792020-04-30 Jakub Jelinek <jakub@redhat.com>
1380
1381 PR c/94842
1382 * c-decl.c (set_labels_context_r): In addition to context-less
1383 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1384 parent function if any.
1385 (store_parm_decls): Adjust comment.
1386
e1113ffb
JJ
13872020-04-19 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR objc/94637
1390 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1391 two CPP_COLON tokens.
1392
2e389749
JJ
13932020-04-17 Jakub Jelinek <jakub@redhat.com>
1394
1395 PR other/94629
1396 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1397 to data.clauses.
1398
2dc9294c
JJ
13992020-04-15 Jakub Jelinek <jakub@redhat.com>
1400
1401 PR c/94593
1402 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1403 requires directive when not at file scope.
1404
13e41d8b
TB
14052020-04-08 Tobias Burnus <tobias@codesourcery.com>
1406
1407 PR middle-end/94120
1408 * c-decl.c (c_check_in_current_scope): New function.
1409 * c-tree.h (c_check_in_current_scope): Declare it.
1410 * c-parser.c (c_parser_oacc_declare): Add check that variables
1411 are declared in the same scope as the directive. Fix handling
1412 of namespace vars.
1413
4df50a05
JJ
14142020-04-07 Jakub Jelinek <jakub@redhat.com>
1415
1416 PR c++/94512
1417 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1418 if c_parser_omp_master succeeded.
1419
5db9e893
JJ
14202020-03-23 Jakub Jelinek <jakub@redhat.com>
1421
1422 PR gcov-profile/94029
1423 PR c/94239
1424 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1425 the function_start_locus location. Don't do that afterwards for the
1426 __GIMPLE body parsing.
1427
9def91e9
JJ
14282020-03-19 Jakub Jelinek <jakub@redhat.com>
1429
1430 PR gcov-profile/94029
1431 * c-tree.h (finish_function): Add location_t argument defaulted to
1432 input_location.
1433 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1434 set it to the locus of closing } if non-NULL.
1435 (c_parser_compound_statement_nostart): Return locus of closing }.
1436 (c_parser_parse_rtl_body): Likewise.
1437 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1438 finish_function.
1439 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1440 input_location to set function_end_locus.
1441
046c5890
JJ
14422020-03-17 Jakub Jelinek <jakub@redhat.com>
1443
1444 PR c/94172
1445 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1446 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1447 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1448 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1449 ENUMERAL_TYPEs.
1450 (finish_incomplete_vars): New function, moved from finish_struct. Use
1451 relayout_decl instead of layout_decl.
1452 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1453 being TYPE_VFIELD. Use finish_incomplete_vars.
1454 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1455 finish_incomplete_vars.
1456 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1457 also on ENUMERAL_TYPEs.
1458
c015ff8c
JJ
14592020-03-16 Jakub Jelinek <jakub@redhat.com>
1460
1461 PR c/94179
1462 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1463
f2e9fe5f
MS
14642020-03-13 Martin Sebor <msebor@redhat.com>
1465
1466 PR c/94040
1467 * c-decl.c (builtin_structptr_type_count): New constant.
1468 (match_builtin_function_types): Reject decls that are incompatible
1469 in types pointed to by pointers.
1470 (diagnose_mismatched_decls): Adjust comments.
1471
c9d70946
JM
14722020-03-05 Joseph Myers <joseph@codesourcery.com>
1473
1474 PR c/93577
1475 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1476 empty when initialized type is error_mark_node.
1477 (set_designator, process_init_element): Ignore initializers for
1478 elements of a variable-size type or of error_mark_node.
1479
726e292d
MS
14802020-03-01 Martin Sebor <msebor@redhat.com>
1481
1482 PR middle-end/93926
1483 * c-decl.c (types_close_enough_to_match): New function.
1484 (match_builtin_function_types):
1485 (diagnose_mismatched_decls): Add missing inform call to a warning.
1486
a499c2f8
MS
14872020-03-01 Martin Sebor <msebor@redhat.com>
1488
1489 PR c/93812
1490 * c-typeck.c (build_functype_attribute_variant): New function.
1491 (composite_type): Call it.
1492
9c3da8cc
JJ
14932020-02-25 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR other/93912
1496 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1497 Rename last argument from probablity to probability.
1498
bacdd5e9
JJ
14992020-02-13 Jakub Jelinek <jakub@redhat.com>
1500
1501 PR c/93576
1502 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1503 *expr if it has side effects.
1504
f9eb0973
JL
15052020-01-30 Jeff Law <law@redhat.com>
1506
1507 PR c/88660
1508 * c-parser.c (c_parser_switch_statement): Make sure to request
1509 marking the switch expr as used.
1510
ac68e287
JM
15112020-01-22 Joseph Myers <joseph@codesourcery.com>
1512
1513 PR c/93348
1514 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1515 argument with integer operands.
1516
852f0ae8
KK
15172020-01-16 Kerem Kat <keremkat@gmail.com>
1518
1519 PR c/92833
1520 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1521 to support 4 available tokens.
1522
e2346a33
JM
15232020-01-15 Joseph Myers <joseph@codesourcery.com>
1524
1525 PR c/93072
1526 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1527 determine whether to set DECL_CONTEXT.
1528
3d77686d
JM
15292020-01-13 Joseph Myers <joseph@codesourcery.com>
1530
1531 PR c/93241
1532 * c-typeck.c (build_c_cast): Check for expressions with integer
1533 operands that can occur in an unevaluated part of an integer
1534 constant expression and call note_integer_operands as needed.
1535
f74c4b2c
RB
15362019-01-08 Richard Biener <rguenther@suse.de>
1537
1538 PR middle-end/93199
1539 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1540 permanently.
1541
8d9254fc
JJ
15422020-01-01 Jakub Jelinek <jakub@redhat.com>
1543
1544 Update copyright years.
1545
39292e25
EB
15462019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1547
1548 * c-decl.c (collect_source_ref_cb): Delete.
1549 (for_each_global_decl): Rename into...
1550 (collect_source_refs): ...this. Call collect_source_ref directly.
1551 (c_parse_final_cleanups): Always call collect_source_ref on the main
1552 input filename.
1553
519d7496
JB
15542019-12-19 Julian Brown <julian@codesourcery.com>
1555 Cesar Philippidis <cesar@codesourcery.com>
1556
1557 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1558 detach clauses.
1559 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1560 Allow deref (->) in variable lists if true.
1561 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1562 Pass to c_parser_omp_variable_list.
1563 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1564 call to c_parser_omp_variable_list.
1565 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1566 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1567 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1568 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1569 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1570 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1571 and detach. Support deref.
1572 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1573 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1574 (c_oacc_check_attachments): New function.
1575 (c_finish_omp_clauses): Check attach/detach arguments for being
1576 pointers using above. Support deref.
1577
a6163563
JB
15782019-12-19 Julian Brown <julian@codesourcery.com>
1579 Maciej W. Rozycki <macro@codesourcery.com>
1580 Tobias Burnus <tobias@codesourcery.com>
1581 Thomas Schwinge <thomas@codesourcery.com>
1582
1583 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1584 (c_parser_oacc_data_clause): Likewise.
1585 (c_parser_oacc_all_clauses): Likewise.
1586 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1587 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1588 PRAGMA_OACC_CLAUSE_NO_CREATE.
1589 * c-typeck.c (handle_omp_array_sections): Support
1590 GOMP_MAP_NO_ALLOC.
1591
d68f5d45
DM
15922019-12-09 David Malcolm <dmalcolm@redhat.com>
1593
1594 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1595 Replace label_text ctor calls.
1596
4691bf46
JM
15972019-12-04 Joseph Myers <joseph@codesourcery.com>
1598
1599 PR c/36941
1600 PR c/88827
1601 * c-typeck.c (convert_lvalue_to_rvalue): Call
1602 require_complete_type for arguments not of void types.
1603 (build_indirect_ref): Do not diagnose dereferencing pointers to
1604 incomplete types.
1605 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1606
85d11957
JM
16072019-12-03 Joseph Myers <joseph@codesourcery.com>
1608
1609 PR c/88704
1610 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1611 old-style parameter definitions.
1612
4569f8b3
SL
16132019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1614
1615 PR target/92499
1616
1617 * c-decl.c (flexible_array_type_p): Move to common code.
1618
65ef05d0
RS
16192019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1620
1621 * c-decl.c (start_decl): Allow initialization of variables whose
1622 size is a POLY_INT_CST.
1623 (finish_decl): Use verify_type_context to check whether the target
1624 allows variables with a particular type to have static or thread-local
1625 storage duration. Don't raise a second error if such variables do
1626 not have a constant size.
1627 (grokdeclarator): Use verify_type_context to check whether the
1628 target allows fields or array elements to have a particular type.
1629 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1630 the target allows pointer difference for the types involved.
1631 (build_unary_op): Likewise for pointer increment and decrement.
1632
34b43828
JM
16332019-11-29 Joseph Myers <joseph@codesourcery.com>
1634
1635 * c-parser.c (struct c_parser): Add members raw_tokens and
1636 raw_tokens_used.
1637 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1638 using previously-lexed raw tokens.
1639 (c_parser_peek_nth_token_raw)
1640 (c_parser_check_balanced_raw_token_sequence): New functions.
1641 (c_parser_nth_token_starts_std_attributes): Use
1642 c_parser_check_balanced_raw_token_sequence for Objective-C.
1643
5b8d9367
JM
16442019-11-25 Joseph Myers <joseph@codesourcery.com>
1645
1646 PR c/91985
1647 * c-decl.c (finish_declspecs): Use int instead of decimal
1648 floating-point types if decimal floating-point not supported.
1649
1723e1be
JM
16502019-11-25 Joseph Myers <joseph@codesourcery.com>
1651
1652 * c-tree.h (struct c_declarator): Use a structure for id member.
1653 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1654 declarators at the start, not when handling individual declarators
1655 later. Use u.id.id instead of u.id.
1656 (grokfield): Use u.id.id instead of u.id.
1657 (build_id_declarator): Set u.id.id and u.id.attrs.
1658 (finish_declspecs): Handle postfix attributes in case of typedef
1659 name or typeof used.
1660 * c-parser.c (c_parser_direct_declarator)
1661 (c_parser_direct_declarator_inner): Place declarator for
1662 attributes inside that for function or array, not outside. Set
1663 u.id.attrs for identifiers.
1664 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1665 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1666 instead of u.id.
1667
bdaf8be1
JJ
16682019-11-22 Jakub Jelinek <jakub@redhat.com>
1669
1670 PR c/90677
1671 * c-decl.c (identifier_global_tag): Define.
1672
3e00ba47
RB
16732019-11-20 Richard Biener <rguenther@suse.de>
1674
1675 PR c/92088
1676 * c-decl.c (grokdeclarator): Prevent inlining of nested
1677 function with VLA arguments.
1678
8c5b727a
JM
16792019-11-20 Joseph Myers <joseph@codesourcery.com>
1680
1681 * c-decl.c (c_warn_type_attributes): New function.
1682 (groktypename, grokdeclarator, finish_declspecs): Call
1683 c_warn_type_attributes before applying attributes to types.
1684 * c-tree.h (c_warn_type_attributes): Declare.
1685
192961ff
JM
16862019-11-19 Joseph Myers <joseph@codesourcery.com>
1687
1688 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1689 standard attributes.
1690 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1691 pedwarn for unknown standard attributes and return error_mark_node
1692 for them.
1693
20a38017
MM
16942019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1695
1696 * c-parser.c (c_parser_parse_rtl_body): Always call
1697 run_rtl_passes, even if startwith pass is not provided.
1698
d5fbe5e0
JM
16992019-11-15 Joseph Myers <joseph@codesourcery.com>
1700
1701 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1702 duplicate standard attributes.
1703
97cc1187
JM
17042019-11-15 Joseph Myers <joseph@codesourcery.com>
1705
1706 * c-decl.c (std_attribute_table): Add maybe_unused.
1707
f8aea5e3
JM
17082019-11-15 Joseph Myers <joseph@codesourcery.com>
1709
1710 * c-decl.c (std_attribute_table): Add fallthrough.
1711 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1712 attribute at top level.
1713
2cc94aa8
JM
17142019-11-15 Joseph Myers <joseph@codesourcery.com>
1715
1716 * c-decl.c (std_attribute_table): New.
1717 (c_init_decl_processing): Register attributes from
1718 std_attribute_table.
1719 * c-parser.c (c_parser_attribute_arguments): Add arguments
1720 require_string and allow_empty_args. All callers changed.
1721 (c_parser_std_attribute): Set require_string argument for
1722 "deprecated" attribute.
1723
7c5890cc
JM
17242019-11-14 Joseph Myers <joseph@codesourcery.com>
1725
1726 * c-parser.c (c_parser_postfix_expression)
1727 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1728 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1729
e8738f4e
RS
17302019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1731
1732 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1733 of build_same_sized_truth_vector_type.
1734 (build_vec_cmp): Likewise.
1735
b2417b59
JJ
17362019-11-14 Jakub Jelinek <jakub@redhat.com>
1737
bedb7f04
JJ
1738 * c-parser.c (c_parser_omp_context_selector): Don't require score
1739 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1740 negative score.
1741
b2417b59
JJ
1742 * c-parser.c (c_parser_omp_context_selector): Rename
1743 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1744 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1745 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1746 and string literals.
1747
4e03c3a7
JM
17482019-11-14 Joseph Myers <joseph@codesourcery.com>
1749
1750 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1751 ctsk_tagfirstref_attrs.
1752 (struct c_declspecs): Update description of attrs. Add
1753 postfix_attrs and non_std_attrs_seen_p. Increase size of
1754 typespec_kind bit-field.
1755 (c_warn_unused_attributes): New declaration.
1756 (parser_xref_tag): Update prototype.
1757 * c-decl.c (c_warn_unused_attributes): New function.
1758 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1759 ctsk_tagref_attrs. Handle attribute declarations.
1760 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1761 (grokdeclarator): Handle standard attributes.
1762 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1763 attributes to incomplete type reference.
1764 (xref_tag): Update call to parser_xref_tag.
1765 (declspecs_add_addrspace, declspecs_add_type)
1766 (declspecs_add_scspec, declspecs_add_attrs): Set
1767 non_std_attrs_seen_p.
1768 (finish_declspecs): Apply postfix standard attributes to type.
1769 * c-parser.c (c_token_starts_declspecs)
1770 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1771 (c_parser_next_tokens_start_declaration): Update comments.
1772 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1773 parser->tokens[2] to parser->tokens[1].
1774 (c_parser_nth_token_starts_std_attributes)
1775 (c_parser_std_attribute_specifier_sequence): New functions.
1776 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1777 attrs. All callers changed. Handle standard attributes.
1778 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1779 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1780 All callers changed.
1781 (c_parser_declspecs): Add arguments start_std_attr_ok and
1782 end_std_attr_ok. All callers changed. Handle standard
1783 attributes.
1784 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1785 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1786 (c_parser_compound_statement_nostart, c_parser_all_labels)
1787 (c_parser_label, c_parser_statement, c_parser_for_statement):
1788 Handle standard attributes.
1789 * c-parser.h (c_parser_declspecs): Update prototype.
1790 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1791 c_parser_declspecs.
1792
0c29cac4
ML
17932019-11-12 Martin Liska <mliska@suse.cz>
1794
1795 * gimple-parser.c: Do not include params.h.
1796
028d4092
ML
17972019-11-12 Martin Liska <mliska@suse.cz>
1798
1799 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1800 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1801 macro.
1802
62aee289
MR
18032019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1804 Frederik Harwath <frederik@codesourcery.com>
1805
1806 gcc/c/
1807 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1808 (c_parser_oacc_kernels_parallel): Rename function to...
1809 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1810 (c_parser_omp_construct): Update accordingly.
1811
1812
7cec9588
JJ
18132019-11-11 Jakub Jelinek <jakub@redhat.com>
1814
1815 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1816 without corresponding end declare target.
1817
f486280c
RS
18182019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1819
1820 * c-convert.c (convert): Only handle vector conversions if one of
1821 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1822 allows it.
1823 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1824 vectors satisfy gnu_vector_type_p.
1825 (build_unary_op): Only allow unary operators to be applied to
1826 vectors if they satisfy gnu_vector_type_p.
1827 (digest_init): Only allow by-element initialization of vectors
1828 if they satisfy gnu_vector_type_p.
1829 (really_start_incremental_init): Likewise.
1830 (push_init_level): Likewise.
1831 (pop_init_level): Likewise.
1832 (process_init_element): Likewise.
1833 (build_binary_op): Only allow binary operators to be applied to
1834 vectors if they satisfy gnu_vector_type_p.
1835
017c6491
JM
18362019-11-08 Joseph Myers <joseph@codesourcery.com>
1837
1838 * c-decl.c (grokparms): Convert () in a function definition to
1839 (void) for C2x.
1840 (store_parm_decls_oldstyle): Pedwarn for C2x.
1841 (store_parm_decls): Update comment about () not generating a
1842 prototype.
1843
c01bd174
JM
18442019-11-07 Joseph Myers <joseph@codesourcery.com>
1845
1846 * c-parser.c (c_parser_attribute_arguments): New function.
1847 Factored out of c_parser_gnu_attribute.
1848 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1849 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1850 (c_parser_std_attribute_specifier): New functions.
1851 (c_parser_transaction_attributes): Use
1852 c_parser_std_attribute_specifier.
1853
471c5330
JM
18542019-11-07 Joseph Myers <joseph@codesourcery.com>
1855
1856 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1857 lex_joined_string and translate_strings_p.
1858 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1859 c_lex_with_flags.
1860 (c_parser_string_literal): New function.
1861 (c_parser_static_assert_declaration_no_semi): Use
1862 c_parser_string_literal. Do not set lex_untranslated_string.
1863 (c_parser_asm_string_literal): Use c_parser_string_literal.
1864 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1865 (c_parser_gnu_attributes): Set and restore translate_strings_p
1866 instead of lex_untranslated_string.
1867 (c_parser_asm_statement): Do not set lex_untranslated_string.
1868 (c_parser_asm_operands): Likewise.
1869 (c_parser_has_attribute_expression): Set and restore
1870 translate_strings_p instead of lex_untranslated_string.
1871 (c_parser_postfix_expression): Use c_parser_string_literal.
1872 (pragma_lex): Likewise.
1873 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1874 (c_parse_file): Set translate_strings_p.
1875 * gimple-parser.c (c_parser_gimple_postfix_expression)
1876 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1877 * c-parser.c (c_parser_string_literal): Declare function.
1878
d0c464d2
JJ
18792019-11-02 Jakub Jelinek <jakub@redhat.com>
1880
1881 * c-parser.c (c_finish_omp_declare_variant): Use
1882 omp_get_context_selector instead of c_omp_get_context_selector.
1883
ac2cfa6c
RS
18842019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1885
1886 * c-tree.h (c_simulate_enum_decl): Declare.
1887 * c-decl.c (c_simulate_enum_decl): New function.
1888 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1889
74078538
RS
18902019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1891
1892 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1893 * c-decl.c (c_simulate_builtin_function_decl): New function.
1894 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1895 to the above.
1896
ad1539d5
MS
18972019-10-28 Martin Sebor <msebor@redhat.com>
1898
1899 PR c/66970
1900 * c-decl.c (names_builtin_p): Define a new function.
1901
cb73e4e7
RB
19022019-10-28 Richard Biener <rguenther@suse.de>
1903
1904 PR c/92249
1905 * gimple-parser.c (c_parser_parse_gimple_body): Make
1906 current_bb the entry block initially to easier recover
1907 from errors.
1908 (c_parser_gimple_compound_statement): Adjust.
1909
135df52c
JJ
19102019-10-24 Jakub Jelinek <jakub@redhat.com>
1911
1912 * c-parser.c (c_finish_omp_declare_variant): Use
1913 omp_context_selector_matches instead of
1914 c_omp_context_selector_matches.
1915 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1916 attribute in between declare target and end declare target
1917 pragmas.
1918
783bfe5e
JM
19192019-10-15 Joseph Myers <joseph@codesourcery.com>
1920
1921 * c-parser.c (c_parser_attribute_any_word): Rename to
1922 c_parser_gnu_attribute_any_word. All callers changed.
1923 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1924 callers changed.
1925 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1926 callers changed.
1927 (c_parser_declaration_or_fndef, c_parser_declspecs)
1928 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1929 (c_parser_struct_declaration, c_parser_declarator)
1930 (c_parser_gnu_attribute, c_parser_compound_statement)
1931 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1932 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1933 attribute-related syntax productions.
1934
56898e43
RS
19352019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1936
1937 * c-objc-common.c (useful_aka_type_p): Replace with...
1938 (get_aka_type): ...this new function. Given the original type,
1939 decide which aka type to print (if any). Only look through typedefs
1940 if user_facing_original_type_p.
1941 (print_type): Update accordingly.
1942
b9424661
JJ
19432019-10-14 Jakub Jelinek <jakub@redhat.com>
1944
1945 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1946 into int NESTED, if it is 2, diagnose missing commas in between
1947 clauses.
1948 (c_parser_omp_context_selector): Pass 2 as last argument to
1949 c_parser_omp_all_clauses.
1950
20de9568
JJ
19512019-10-12 Jakub Jelinek <jakub@redhat.com>
1952
1953 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1954 For simd properties, put them directly into TREE_VALUE.
1955 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1956 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1957 add "omp declare variant base" attribute rather than
1958 "omp declare variant".
1959
fe2bc27c
JM
19602019-10-11 Joseph Myers <joseph@codesourcery.com>
1961
1962 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1963
94e7f906
JJ
19642019-10-10 Jakub Jelinek <jakub@redhat.com>
1965
1966 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1967 true, terminate processing on closing paren and don't skip to end of
1968 pragma line.
1969 (c_parser_omp_declare_simd): Handle also declare variant.
1970 (omp_construct_selectors, omp_device_selectors,
1971 omp_implementation_selectors, omp_user_selectors): New variables.
1972 (c_parser_omp_context_selector,
1973 c_parser_omp_context_selector_specification,
1974 c_finish_omp_declare_variant): New functions.
1975 (c_finish_omp_declare_simd): Handle both declare simd and
1976 declare variant.
1977 (c_parser_omp_declare): Handle declare variant.
1978
93313b94
JM
19792019-10-02 Joseph Myers <joseph@codesourcery.com>
1980
1981 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1982 CPP_COLON tokens.
1983
55879815
RS
19842019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1985
1986 * c-objc-common.c (useful_aka_type_p): New function.
1987 (print_type): Use it to decide whether an aka type is worth printing.
1988
59bc434a
JJ
19892019-09-27 Jakub Jelinek <jakub@redhat.com>
1990
1991 PR c++/88203
1992 * c-parser.c (c_parser_predefined_identifier): New function.
1993 (c_parser_postfix_expression): Use it.
1994 (c_parser_omp_variable_list): Parse predefined identifiers.
1995 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1996 in shared and firstprivate clauses, even when they are predetermined
1997 shared.
1998
c6447c20
RS
19992019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2000
2001 * c-typeck.c (build_function_call_vec): Take the original function
2002 decl as an optional final parameter. Pass all built-in calls to
2003 check_builtin_function_arguments.
2004
522da4c2
EB
20052019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2006
2007 PR c/91815
2008 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2009 of identifiers in the external scope only for variables and functions.
2010
68e2c199
PK
20112019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2012
2013 PR c/78736
2014 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2015
22f8849d
IS
20162019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2017
2018 PR pch/61250
2019 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2020 after determining that the first token is not
2021 PRAGMA_GCC_PCH_PREPROCESS.
2022
db376f45
EB
20232019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2024
2025 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2026 FUNCTION_DECL to the right value in the presence of nested declarators.
2027
4d732405
RS
20282019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2029
2030 PR middle-end/91421
2031 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2032
cb1180d5
RS
20332019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2034
2035 PR middle-end/91421
2036 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2037 of a built_in_function.
2038 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2039
77eb117f
JJ
20402019-08-10 Jakub Jelinek <jakub@redhat.com>
2041
2042 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2043 (c_parser_omp_clause_device_type): New function.
2044 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2045 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2046 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2047 diagnostics for declare target with clauses nested in clause-less
2048 declare target declaration-definition-seq.
2049 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2050
2c3b8bad
JJ
20512019-08-09 Jakub Jelinek <jakub@redhat.com>
2052
bb522e2e
JJ
2053 * c-parser.c (check_no_duplicate_clause): Simplify using
2054 omp_find_clause.
2055 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2056 directive name modifiers.
2057 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2058
2c3b8bad
JJ
2059 PR c/91401
2060 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2061 check_no_duplicate_clause call. Comment it out, instead emit a
2062 warning for duplicate dist_schedule clauses.
2063
99769e7f
RS
20642019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2065
2066 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2067
8860d270
JJ
20682019-08-08 Jakub Jelinek <jakub@redhat.com>
2069
2070 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2071 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2072 instead of generic_head to track duplicates.
2073
398e3feb
JJ
20742019-08-07 Jakub Jelinek <jakub@redhat.com>
2075
2076 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2077 (c_parser_omp_clause_use_device_addr): New function.
2078 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2079 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2080 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2081 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2082 map or use_device_* clauses.
2083 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2084 in OpenMP, require pointer type rather than pointer or array type.
2085 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2086
a28351e7
JJ
20872019-07-31 Jakub Jelinek <jakub@redhat.com>
2088
2089 PR c/91192
2090 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2091 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2092 case.
2093
6343b6bf
ML
20942019-07-25 Martin Liska <mliska@suse.cz>
2095 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2096
2097 PR c++/23383
2098 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2099
cb50701e
ML
21002019-07-25 Martin Liska <mliska@suse.cz>
2101
2102 * c-decl.c (merge_decls): Use new macros
2103 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2104
62e3e66f
RB
21052019-07-23 Richard Biener <rguenther@suse.de>
2106
2107 PR tree-optimization/83518
2108 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2109 a CFG also rebuild cgraph edges.
2110
554a530f
JJ
21112019-07-20 Jakub Jelinek <jakub@redhat.com>
2112
2113 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2114 (c_parser_omp_clause_bind): New function.
2115 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2116 (OMP_LOOP_CLAUSE_MASK): Define.
2117 (c_parser_omp_loop): New function.
2118 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2119 loop combined with parallel or teams.
2120 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2121 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2122
d119bf79
RS
21232019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2124
2125 PR c/53633
2126 * c-decl.c (finish_function): Check targetm.warn_func_return
2127 before issuing a -Wreturn-type warning.
2128
ab20d992 21292019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2130
2131 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2132 (c_parser_compound_statement): Call it.
2133
1fdd6f04
JJ
21342019-07-12 Jakub Jelinek <jakub@redhat.com>
2135
2136 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2137 (c_parser_omp_clause_order): New function.
2138 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2139 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2140 PRAGMA_OMP_CLAUSE_ORDER.
2141 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2142
8389386c
RB
21432019-07-10 Richard Biener <rguenther@suse.de>
2144
2145 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2146 _Literal (int *) &x for address literals.
2147
99b1c316
MS
21482019-07-09 Martin Sebor <msebor@redhat.com>
2149
2150 PR c++/61339
2151 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2152 to class.
2153 (field_decl_cmp): Same.
2154 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2155 * c-tree.h: Same.
2156 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2157
6c1dae73
MS
21582019-07-09 Martin Sebor <msebor@redhat.com>
2159
2160 PR c++/61339
2161 * c-decl.c: Change class-key from class to struct and vice versa
2162 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2163 * gimple-parser.c: Same.
2164
69b5279e
RB
21652019-07-01 Richard Biener <rguenther@suse.de>
2166
2167 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2168 _Literal (char *) &"foo" for address literals pointing to
2169 STRING_CSTs.
2170
ab20d992
JJ
21712019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2172
2173 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2174 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2175 C incompatibility if alternate "__intN__" form is used.
2176
1e3d475e
MS
21772019-06-24 Martin Sebor <msebor@redhat.com>
2178
2179 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2180
bf38f7e9
JJ
21812019-06-10 Jakub Jelinek <jakub@redhat.com>
2182
2183 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2184 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2185 (c_parser_omp_scan_loop_body): New function.
2186 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2187 inscan reduction clauses.
2188 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2189 non-inscan reductions on the same construct, or inscan reductions with
2190 ordered or schedule clauses, or inscan array reductions.
2191
65985d78
MS
21922019-06-05 Martin Sebor <msebor@redhat.com>
2193
2194 PR c/90737
2195 * c-typeck.c (c_finish_return): Only consider functions returning
2196 pointers as candidates for -Wreturn-local-addr.
2197
0ecf545c
MS
21982019-06-05 Martin Sebor <msebor@redhat.com>
2199
2200 * c-decl.c (start_decl): Adjust quoting and hyphenation
2201 in diagnostics.
2202 (finish_decl): Same.
2203 (finish_enum): Same.
2204 (start_function): Same.
2205 (declspecs_add_type): Same.
2206 * c-parser.c (warn_for_abs): Same.
2207 * c-typeck.c (build_binary_op): Same.
2208
e03436e7
TS
22092019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2210
b48f44bf
TS
2211 PR c/89433
2212 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2213 marked with an OpenACC 'routine' directive.
2214
5bf04509
TS
2215 PR c/89433
2216 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2217 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2218
e03436e7
TS
2219 PR c/89433
2220 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2221 clauses from "omp declare target" attribute.
2222
a9c697b8
MS
22232019-05-16 Martin Sebor <msebor@redhat.com>
2224
ab20d992
JJ
2225 * c-decl.c (start_decl): Quote keywords, operators, and
2226 types in diagnostics.
2227 (finish_decl): Same.
2228 * c-parser.c (c_parser_asm_statement): Same.
2229 (c_parser_conditional_expression): Same.
2230 (c_parser_transaction_cancel): Same.
2231 * c-typeck.c (c_common_type): Same.
2232 (build_conditional_expr): Same.
2233 (digest_init): Same.
2234 (process_init_element): Same.
2235 (build_binary_op): Same.
a9c697b8 2236
c4499192
RB
22372019-05-17 Richard Biener <rguenther@suse.de>
2238
2239 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2240 (c_parser_gimple_unary_expression): Likewise.
2241 (c_parser_gimple_parentized_ternary_expression): New function.
2242
adfe6e4b
RB
22432019-05-16 Richard Biener <rguenther@suse.de>
2244
2245 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2246 (c_parser_gimple_unary_expression): Likewise.
2247
186dabf2
RB
22482019-05-15 Richard Biener <rguenther@suse.de>
2249
2250 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2251 __BIT_FIELD_REF.
2252
1158c5b4
RB
22532019-05-14 Richard Biener <rguenther@suse.de>
2254
2255 * gimple-parser.c (c_parser_gimple_statement): Remove
2256 questionable auto-promotion to VIEW_CONVERT_EXPR.
2257 (c_parser_gimple_typespec): Split out from __MEM parsing.
2258 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2259 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2260 as __VIEW_CONVERT with -gimple.
2261
fd4485aa
ML
22622019-05-09 Martin Liska <mliska@suse.cz>
2263
2264 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2265 __MAX.
2266 (c_parser_gimple_unary_expression): Parse also binary expression
2267 __MIN and __MAX.
2268 (c_parser_gimple_parentized_binary_expression): New function.
2269
d276406a
ML
22702019-05-09 Martin Liska <mliska@suse.cz>
2271
2272 * gimple-parser.c (struct gimple_parser): Add probability.
2273 for gimple_parser_edge.
2274 (gimple_parser::push_edge): Add new argument probability.
2275 (c_parser_gimple_parse_bb_spec): Parse also probability
2276 if present.
2277 (c_parser_parse_gimple_body): Set edge probability.
2278 (c_parser_gimple_compound_statement): Consume token
2279 before calling c_parser_gimple_goto_stmt.
2280 Parse BB counts.
2281 (c_parser_gimple_statement): Pass new argument.
2282 (c_parser_gimple_goto_stmt): Likewise.
2283 (c_parser_gimple_if_stmt): Likewise.
2284 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2285 * c-parser.c (c_parser_declaration_or_fndef): Pass
2286 hot_bb_threshold argument.
2287 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2288 field.
2289 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2290
f179b64e
JJ
22912019-04-26 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR debug/90197
2294 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2295 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2296 (c_parser_do_statement): Likewise.
2297 (c_parser_for_statement): Likewise. Formatting fixes.
2298 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2299 emit DEBUG_BEGIN_STMTs if needed.
2300
e7178413
JJ
23012019-04-19 Jakub Jelinek <jakub@redhat.com>
2302
c280b7ee
JJ
2303 PR c/89888
2304 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2305 (c_start_case): Don't clear it.
2306 (do_case): Adjust c_add_case_label caller.
2307 (c_finish_case): Adjust c_do_switch_warnings caller.
2308
e7178413
JJ
2309 PR c++/90108
2310 * c-decl.c (merge_decls): If remove is main variant and
2311 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2312 variant that has newdecl as TYPE_NAME if any.
2313
60a2c645
JJ
23142019-04-12 Jakub Jelinek <jakub@redhat.com>
2315
2316 PR c/89933
2317 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2318 don't try to remove it from the variant list, but instead assert
2319 it has no variants.
2320
2a82beaa
RB
23212019-04-01 Richard Biener <rguenther@suse.de>
2322
2323 PR c/71598
2324 * c-tree.h (c_get_alias_set): Declare.
2325 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2326 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2327 as the underlying integer type.
2328
bec1da64
MS
23292019-03-19 Martin Sebor <msebor@redhat.com>
2330
2331 PR tree-optimization/89688
2332 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2333 kinds of initializers.
2334
855cd9b1
JJ
23352019-03-19 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR c/89734
2338 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2339 return type even if quals_used is 0. Formatting fixes.
2340
baa09dc5
RB
23412019-03-14 Richard Biener <rguenther@suse.de>
2342
2343 * c-tree.h (enum c_declspec_il): New.
2344 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2345 enum bitfield.
2346 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2347 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2348 (c_parser_declspecs): Adjust.
2349 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2350 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2351 and bitmap.h.
2352 (struct gimple_parser): New.
2353 (gimple_parser::push_edge): New method.
2354 (c_parser_gimple_parse_bb_spec): New helper.
2355 (c_parser_parse_gimple_body): Get start pass and IL specification.
2356 Initialize SSA and CFG.
2357 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2358 Build a gimple_parser parsing state and pass it along.
2359 (c_parser_gimple_statement): Change intermittend __PHI internal
2360 function argument for the edge.
2361 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2362 (c_parser_gimple_goto_stmt): Record edges to build.
2363 (c_parser_gimple_if_stmt): Likewise.
2364 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2365 (c_parser_gimple_or_rtl_pass_list): Likewise.
2366
a3f9f006
ML
23672019-03-11 Martin Liska <mliska@suse.cz>
2368
2369 * c-decl.c (check_for_loop_decls): Wrap an option name
2370 in a string format message and fix GNU coding style.
2371 * c-parser.c (c_parser_declspecs): Likewise.
2372
1db01ff9
JJ
23732019-03-08 Jakub Jelinek <jakub@redhat.com>
2374
2375 PR tree-optimization/89550
2376 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2377 returned true.
2378 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2379 or warning returned true.
2380
66dcb747
JJ
23812019-02-28 Jakub Jelinek <jakub@redhat.com>
2382
2383 PR c/89525
2384 * c-typeck.c (convert_arguments): Call inform_declaration only if
2385 the previous warning_at call returned true.
2386
2263c9f2
TS
23872019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2388
2389 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2390 parameter. Adjust all users.
2391 (c_parser_oacc_simple_clause): Replace parser with loc formal
2392 parameter. Adjust all users.
2393
ab20d992 23942019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2395
2396 PR c/87924
2397 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2398 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2399
5f88ba10
JJ
24002019-02-15 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c/89340
2403 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2404 before c_decl_attributes rather than after it.
2405
cfc30fd1
JJ
24062019-02-06 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR c/89211
2409 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2410 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2411 instead of 3 nested ifs.
2412
fbe83e6b
JM
24132019-02-06 Joseph Myers <joseph@codesourcery.com>
2414
2415 PR c/88584
2416 * c-decl.c (finish_decl): Do not complete array types for arrays
2417 with external linkage not at file scope.
2418
f461f938
RB
24192019-02-05 Richard Biener <rguenther@suse.de>
2420
2421 PR c/88606
2422 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2423 all type variants when not supported.
2424
fe509359
JJ
24252019-01-30 Jakub Jelinek <jakub@redhat.com>
2426
2427 PR c/89061
2428 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2429 * c-decl.c (decl_jump_unsafe): Return false for
2430 C_DECL_COMPOUND_LITERAL_P decls.
2431 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2432
6a335b96
JJ
24332019-01-29 Jakub Jelinek <jakub@redhat.com>
2434
f4b7e754
JJ
2435 PR c/89045
2436 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2437 scope.
2438
6a335b96
JJ
2439 PR c/86125
2440 * c-decl.c (last_fileptr_type): Remove.
2441 (last_structptr_types): New variable.
2442 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2443 {old,new}rettype instead of the types themselves. Assert
2444 last_structptr_types array has the same number of elements
2445 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2446 argument oldtype and newtype. Instead of handling
2447 just fileptr_type_node specially, handle all builtin_structptr_types
2448 pointer nodes. Formatting fix.
2449
d8b5a1a0
MS
24502019-01-24 Martin Sebor <msebor@redhat.com>
2451
2452 PR c/86125
2453 PR c/88886
2454 PR middle-end/86308
2455 * c-decl.c (match_builtin_function_types): Add arguments.
2456 (diagnose_mismatched_decls): Diagnose mismatched declarations
2457 of built-ins more strictly.
2458
e21c4491
JJ
24592019-01-24 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR c++/88976
2462 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2463 on #pragma omp cancel with different modifiers.
2464
420183d9
L
24652019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2466
2467 PR c/51628
2468 PR c/88664
2469 * c-typeck.c (convert_for_assignment): Upate the
2470 warn_for_address_or_pointer_of_packed_member call.
2471
17ad43dd
TH
24722019-01-16 Tom Honermann <tom@honermann.net>
2473 Jason Merrill <jason@redhat.com>
2474
2475 * c-typeck.c (digest_init): Revised the error message produced for
2476 ill-formed cases of array initialization with a string literal.
2477 (error_init): Make variadic.
2478
5f07d78a
JJ
24792019-01-12 Jakub Jelinek <jakub@redhat.com>
2480
2481 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2482
c4581bbf
JJ
24832019-01-07 Jakub Jelinek <jakub@redhat.com>
2484
2485 PR c/88701
2486 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2487 if current_function_decl is non-NULL.
2488
65c5b1eb
JM
24892019-01-07 Joseph Myers <joseph@codesourcery.com>
2490
2491 PR c/88720
2492 PR c/88726
2493 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2494 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2495 functions declared but never defined only for external scope, not
2496 for other scopes.
2497
d8fcab68
JJ
24982019-01-07 Jakub Jelinek <jakub@redhat.com>
2499
2500 PR c++/85052
2501 * c-parser.c (c_parser_postfix_expression): Parse
2502 __builtin_convertvector.
2503
a5544970
JJ
25042019-01-01 Jakub Jelinek <jakub@redhat.com>
2505
2506 Update copyright years.
2507
da77eace
L
25082018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2509
2510 PR c/51628
2511 * c-typeck.c (convert_for_assignment): Call
2512 warn_for_address_or_pointer_of_packed_member.
2513
1edf8866
SB
25142018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2515
2516 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2517 a more specific error message (instead of just falling through).
2518
db4fd626
SB
25192018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2520
2521 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2522 asm qualifier is first seen; use that to give nicer "duplicate asm
2523 qualifier" messages. Delete 'quals" variable, instead pass the
2524 "is_volatile_ flag to build_asm_stmt directly.
2525 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2526 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2527
9c9cfcbb
SB
25282018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2529
2530 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2531 "done" boolean variable.
2532
a14feb3c
DM
25332018-12-19 David Malcolm <dmalcolm@redhat.com>
2534
2535 PR c++/87504
2536 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2537 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2538 (build_binary_op): Use struct op_location_t and
2539 class binary_op_rich_location.
2540
6d939173
JJ
25412018-12-11 Jakub Jelinek <jakub@redhat.com>
2542
2543 PR sanitizer/88426
2544 * c-convert.c (convert): Call c_fully_fold before calling
2545 ubsan_instrument_float_cast.
2546
b7055028
SB
25472018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2548
2549 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2550 setting "quals".
2551
5b76e75f
SB
25522018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2553
2554 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2555 after asm. Pass a flag for it to build_asm_expr.
2556 * c-tree.h (build_asm_expr): Update declaration.
2557 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2558 set ASM_INLINE_P.
2559
30bd42b9
SB
25602018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2561
2562 PR inline-asm/55681
2563 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2564 combination of volatile and goto, in any order, without repetitions.
2565
9df6c0e4
JB
25662018-12-04 James Norris <jnorris@codesourcery.com>
2567 Cesar Philippidis <cesar@codesourcery.com>
2568 Julian Brown <julian@codesourcery.com>
2569
2570 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2571 code.
2572
f44697b7
RB
25732018-11-30 Richard Biener <rguenther@suse.de>
2574
2575 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2576 _Literal (type) { ... } as empty aggregate or vector constructor.
2577
550dfbdc
MS
25782018-11-29 Martin Sebor <msebor@redhat.com>
2579
2580 PR c/88091
2581 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2582 (convert_arguments): Add comments. Pass additional argument to
2583 the function above.
2584
673670da
MS
25852018-11-29 Martin Sebor <msebor@redhat.com>
2586
2587 PR c/88172
2588 PR testsuite/88208
2589 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2590
db1d09b0
MS
25912018-11-23 Martin Sebor <msebor@redhat.com>
2592
2593 PR testsuite/88098
2594 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2595 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2596
98f08eb8
MS
25972018-11-20 Martin Sebor <msebor@redhat.com>
2598
2599 * c-parser.c (c_parser_has_attribute_expression): New function.
2600 (c_parser_attribute): New function.
2601 (c_parser_attributes): Move code into c_parser_attribute.
2602 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2603
cd5da983
MS
26042018-11-15 Martin Sebor <msebor@redhat.com>
2605
2606 PR c/83656
2607 * c-decl.c (header_for_builtin_fn): Declare.
2608 (diagnose_mismatched_decls): Diagnose declarations of built-in
2609 functions without a prototype.
2610 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2611 (convert_argument): Same.
2612 (convert_arguments): Factor code out into convert_argument.
2613 Detect mismatches between built-in formal arguments in calls
2614 to built-in without prototype.
2615 (build_conditional_expr): Same.
2616 (type_or_builtin_type): New function.
2617 (convert_for_assignment): Add argument. Conditionally issue
2618 warnings instead of errors for mismatches.
2619
620e594b
DM
26202018-11-13 David Malcolm <dmalcolm@redhat.com>
2621
2622 * c-decl.c: Replace "source_location" with "location_t".
2623 * c-tree.h: Likewise.
2624 * c-typeck.c: Likewise.
2625 * gimple-parser.c: Likewise.
2626
3179ebae
JJ
26272018-11-09 Jakub Jelinek <jakub@redhat.com>
2628
81a227c6
JJ
2629 * c-parser.c (c_parser_omp_clause_final): Use
2630 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2631 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2632 parsing instead of c_parser_paren_condition.
2633 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2634 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2635 c_fully_fold instead of c_parser_condition.
2636 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2637 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2638 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2639 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2640 c_parser_expr_no_commas instead of c_parser_expression.
2641
98c91c56
JJ
2642 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2643 reduction clause with inscan modifier.
2644
3179ebae
JJ
2645 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2646 clauses other than atomic_default_mem_order.
2647
28567c40
JJ
26482018-11-08 Jakub Jelinek <jakub@redhat.com>
2649
2650 * c-parser.c: Include memmode.h.
2651 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2652 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2653 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2654 task_reduction clauses.
2655 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2656 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2657 section, or lvalue assignment expression.
2658 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2659 (c_parser_omp_clause_lastprivate): Parse optional
2660 conditional: modifier.
2661 (c_parser_omp_clause_hint): Require constant integer expression rather
2662 than just integer expression.
2663 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2664 clause.
2665 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2666 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2667 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2668 functions.
2669 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2670 iterators. Parse mutexinoutset and depobj kinds.
2671 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2672 callers.
2673 (c_parser_omp_all_clauses): Likewise. Handle
2674 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2675 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2676 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2677 default memory order from requires directive if any. Adjust
2678 c_finish_omp_atomic caller.
2679 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2680 (c_parser_omp_flush): Parse flush with memory-order-clause.
2681 (c_parser_omp_for_loop): Allow NE_EXPR even in
2682 OpenMP loops, adjust c_finish_omp_for caller.
2683 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2684 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2685 Allow to be called while parsing combined parallel master.
2686 Parse combined master taskloop{, simd}.
2687 (c_parser_omp_parallel): Parse combined
2688 parallel master{, taskloop{, simd}} constructs.
2689 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2690 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2691 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2692 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2693 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2694 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2695 around teams body. Use SET_EXPR_LOCATION.
2696 (c_parser_omp_target_data): Allow target data
2697 with only use_device_ptr clauses.
2698 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2699 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2700 (c_parser_omp_requires): New function.
2701 (c_finish_taskloop_clauses): New function.
2702 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2703 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2704 declaration. Disallow in_reduction clause when combined with parallel
2705 master.
2706 (c_parser_omp_construct): Adjust c_parser_omp_master and
2707 c_parser_omp_taskgroup callers.
2708 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2709 other than cancel.
2710 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2711 like OMP_CLAUSE_REDUCTION.
2712 (handle_omp_array_sections): Likewise. Call save_expr on array
2713 reductions before calling build_index_type. Handle depend clauses
2714 with iterators.
2715 (struct c_find_omp_var_s): New type.
2716 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2717 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2718 with static, runtime or auto schedule kinds. Call save_expr for whole
2719 array reduction sizes. Diagnose reductions with zero sized elements
2720 or variable length structures. Diagnose nogroup clause used with
2721 reduction clause(s). Handle depend clause with
2722 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2723 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2724 some different type for other kinds. Use build_unary_op with
2725 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2726 Handle depend clauses with iterators. Remove no longer needed special
2727 case that predetermined const qualified vars may be specified in
2728 firstprivate clause. Complain if const qualified vars are mentioned
2729 in data-sharing clauses other than firstprivate or shared. Use
2730 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2731 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2732 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2733 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2734
7e2de6df
DM
27352018-10-29 David Malcolm <dmalcolm@redhat.com>
2736
2737 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2738 logic for change to name_hint::operator bool.
2739 (undeclared_variable): Likewise.
2740 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2741 (c_parser_parameter_declaration): Likewise.
2742
9f936c86
JM
27432018-10-17 Joseph Myers <joseph@codesourcery.com>
2744
2745 * c-errors.c (pedwarn_c11): New function.
2746 * c-parser.c (disable_extension_diagnostics): Save
2747 warn_c11_c2x_compat and set it to 0.
2748 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2749 (c_parser_static_assert_declaration_no_semi): Handle
2750 _Static_assert without string constant.
2751 * c-tree.h (pedwarn_c11): New prototype.
2752
033eb567
DM
27532018-10-17 David Malcolm <dmalcolm@redhat.com>
2754
2755 * Make-lang.in (selftest-c): New.
2756 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2757 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2758 from gcc/Makefile.in.
2759
0edf3afe
RB
27602018-10-02 Richard Biener <rguenther@suse.de>
2761
2762 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2763
8313a764
JM
27642018-09-26 Joseph Myers <joseph@codesourcery.com>
2765
2766 PR c/87390
2767 * c-typeck.c (build_binary_op): Use excess precision for
2768 comparisons of integers and floating-point for C11 and later.
2769
ce6f0888
MJ
27702018-09-26 Martin Jambor <mjambor@suse.cz>
2771
2772 PR c/87347
2773 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2774 comment.
ce6f0888 2775
9c4a4b3c
DM
27762018-09-17 David Malcolm <dmalcolm@redhat.com>
2777
2778 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2779 Update for new param.
2780 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2781 Likewise.
2782
80c6d1f4
MJ
27832018-09-17 Martin Jambor <mjambor@suse.cz>
2784
2785 PR c/63886
2786 * c-parser.c: (warn_for_abs): New function.
2787 (c_parser_postfix_expression_after_primary): Call it.
2788
4a426e36
BE
27892018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2790
2791 * c-typeck.c (digest_init): Shorten overlength strings.
2792
6d900107
BE
27932018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2794
2795 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2796
b5764229
BE
27972018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2798
2799 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2800 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2801
22eea6b2
AM
28022018-08-30 Alexander Monakov <amonakov@ispras.ru>
2803
2804 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2805 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2806
85204e23
DM
28072018-08-27 David Malcolm <dmalcolm@redhat.com>
2808
2809 PR 87091
2810 * c-decl.c (implicitly_declare): Update call to
2811 maybe_add_include_fixit to suggest overriding the location, as it
2812 is for a note.
2813 * c-objc-common.c (c_tree_printer): Update for conversion of
2814 show_caret_p to a tri-state.
2815
3d78e008
ML
28162018-08-27 Martin Liska <mliska@suse.cz>
2817
2818 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2819 fndecl_built_in_p and remove check for FUNCTION_DECL if
2820 possible.
3d78e008
ML
2821 (diagnose_mismatched_decls): Likewise.
2822 (merge_decls): Likewise.
2823 (warn_if_shadowing): Likewise.
2824 (pushdecl): Likewise.
2825 (implicitly_declare): Likewise.
2826 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2827 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2828 * c-typeck.c (build_function_call_vec): Likewise.
2829 (convert_arguments): Likewise.
2830
097f82ec
DM
28312018-08-20 David Malcolm <dmalcolm@redhat.com>
2832
2833 PR other/84889
2834 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2835 (diagnose_mismatched_decls): Likewise, in various places.
2836 (warn_if_shadowing): Likewise.
2837 (implicit_decl_warning): Likewise.
2838 (implicitly_declare): Likewise.
2839 (undeclared_variable): Likewise.
2840 (declare_label): Likewise.
2841 (grokdeclarator): Likewise.
2842 (start_function): Likewise.
2843 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2844 (c_parser_parameter_declaration): Likewise.
2845 (c_parser_binary_expression): Likewise.
2846 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2847 (parser_build_binary_op): Likewise.
2848 (build_unary_op): Likewise.
2849 (error_init): Likewise.
2850 (pedwarn_init): Likewise.
2851 (warning_init): Likewise.
2852 (convert_for_assignment): Likewise.
2853
96e6ae57
DM
28542018-08-15 David Malcolm <dmalcolm@redhat.com>
2855
2856 * c-objc-common.c: Include "gcc-rich-location.h".
2857 (c_tree_printer): Move implemenation of '%T' to...
2858 (print_type): ...this new function.
2859 (range_label_for_type_mismatch::get_text): New function.
2860 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2861 range for the various ic_argpass cases.
2862 (class maybe_range_label_for_tree_type_mismatch): New class.
2863 (build_binary_op): Use it when calling binary_op_error.
2864
0cd020ae 28652018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2866
0cd020ae
PK
2867 * c-decl.c (start_decl): Do not warn if variables is named as main
2868 and is a local variable.
2869
72733314
IS
28702018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2871
2872 PR c/19315
2873 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2874 objects of unknown size.
2875
23aa9f7c
MS
28762018-08-13 Martin Sebor <msebor@redhat.com>
2877
2878 PR tree-optimization/71625
2879 * c-parser.c (c_parser_declaration_or_fndef): Call
2880 braced_list_to_string.
2881
e5e7e50d
BH
28822018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2883
2884 PR c/86690
2885 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2886 errors.
2887
8a45b051
MS
28882018-08-01 Martin Sebor <msebor@redhat.com>
2889
2890 PR tree-optimization/86650
2891 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2892 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2893
5922dcb5
JJ
28942018-08-01 Jakub Jelinek <jakub@redhat.com>
2895
2896 PR c/85704
2897 * c-typeck.c (init_field_decl_cmp): New function.
2898 (output_pending_init_elements): Use it for field comparisons
2899 instead of pure bit_position comparisons.
2900
9b452033
JJ
29012018-07-12 Jakub Jelinek <jakub@redhat.com>
2902
2903 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2904 type here, instead add "omp declare target implicit" attribute.
2905 (finish_decl): Diagnose vars without mappable type here.
2906
ab20d992
JJ
29072018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2908 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2909 Cesar Philippidis <cesar@codesourcery.com>
2910
2911 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2912 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2913 to their non-present_or_* counterparts. Make 'self' an alias to
2914 PRAGMA_OACC_CLAUSE_HOST.
2915 (c_parser_oacc_data_clause): Update GOMP mappings for
2916 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2917 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2918 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2919 Remove support for present_or_* clauses.
2920 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2921 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2922 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2923 (OACC_DATA_CLAUSE_MASK): Likewise.
2924 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2925 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2926 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2927 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2928 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2929
e197e64e
KV
29302018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2931
2932 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2933 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2934 (c_parser_gimple_unary_expression): Likewise.
2935
487f2f61
JJ
29362018-06-15 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR c/86093
2939 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2940 before doing POINTER_DIFF_EXPR.
2941
e4d44a37
MP
29422018-06-07 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/85318
2945 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2946 for loop initial declarations.
2947
b67b9225
DP
29482018-05-30 David Pagan <dave.pagan@oracle.com>
2949
2950 PR c/55976
2951 * c-decl.c (grokdeclarator): Update check for return type warnings.
2952 (start_function): Likewise.
2953 (finish_function): Likewise.
2954 * c-typeck.c (c_finish_return): Update check for return type warnings.
2955 Pass OPT_Wreturn_type to pedwarn when appropriate.
2956
c566cc9f
RS
29572018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2958
2959 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2960 __FMA_EXPR handlng.
2961
e4f81565
RS
29622018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2963
2964 * gimple-parser.c: Include internal-fn.h.
2965 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2966 (c_parser_gimple_call_internal): New function.
2967 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2968 Fix typos in comment.
2969
79e7b1fe
JJ
29702018-05-10 Jakub Jelinek <jakub@redhat.com>
2971
2972 PR c++/85662
2973 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2974 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2975 fold_convert_loc.
2976 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2977 fold_offsetof_1, pass argtype as TYPE to it and drop the
2978 fold_convert_loc.
2979
f7584c81
DP
29802018-05-02 David Pagan <dave.pagan@oracle.com>
2981
2982 PR c/30552
2983 * c-decl.c (old_style_parameter_scope): New function.
2984 * c-parser.c (c_parser_postfix_expression): Check for statement
2985 expressions in old-style function parameter list declarations.
2986 * c-parser.h (old_style_parameter_scope): New extern declaration.
2987
b33a0cb3
JJ
29882018-04-25 Jakub Jelinek <jakub@redhat.com>
2989
2990 PR sanitizer/84307
2991 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2992 it is not TREE_STATIC.
2993 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2994 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2995 its COMPOUND_LITERAL_EXPR_DECL.
2996
c5c5822a
JM
29972018-03-21 Joseph Myers <joseph@codesourcery.com>
2998
2999 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3000 where all functions return the same _FloatN or _FloatNx type,
3001 treat integer types as _Float64 instead of double.
3002
aa1c9429
JJ
30032018-03-21 Jakub Jelinek <jakub@redhat.com>
3004
3005 PR c/84999
3006 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3007 building vector comparison, diagnose it and return error_mark_node.
3008
9bb45a95
JJ
30092018-03-15 Jakub Jelinek <jakub@redhat.com>
3010
3011 PR c/84853
3012 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3013 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3014 INTEGER_TYPE element type.
3015
ada6bad9
DP
30162018-03-13 David Pagan <dave.pagan@oracle.com>
3017
3018 PR c/46921
3019 * c-typeck.c (output_init_element): Ensure field initializer
3020 expression is always evaluated if there are side effects.
3021
849bbdb9
JJ
30222018-03-06 Jakub Jelinek <jakub@redhat.com>
3023
3024 PR c/84721
3025 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3026 !building_stmt_list_p ().
3027
d74641bd
RS
30282018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3029
3030 PR c/84305
3031 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3032 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3033 and include the BIND_EXPR in the list of things that need to be
3034 pre-evaluated.
3035
0444aa9c
NS
30362018-02-09 Nathan Sidwell <nathan@acm.org>
3037
3038 PR c/84293
3039 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3040 to strict_aliasing_warning.
3041
7c30b12a
PC
30422018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3043
3044 * c-typeck.c (really_start_incremental_init, push_init_level,
3045 set_nonincremental_init, output_init_element, process_init_element):
3046 Use DECL_UNNAMED_BIT_FIELD.
3047
2be4dfcb
MP
30482018-01-31 Marek Polacek <polacek@redhat.com>
3049
3050 PR c/81779
3051 * c-parser.c (c_parser_compound_statement_nostart): Call
3052 expansion_point_location_if_in_system_header.
3053
bb9869d5
DM
30542018-01-17 David Malcolm <dmalcolm@redhat.com>
3055
3056 PR c++/83814
3057 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3058 the C part.
3059
b4923738
JJ
30602018-01-13 Jakub Jelinek <jakub@redhat.com>
3061
3062 PR c/83801
3063 * c-tree.h (decl_constant_value_1): Add a bool argument.
3064 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3065 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3066 (decl_constant_value): Adjust caller.
3067 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3068 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3069 decl_constant_value returns initializer that has BLKmode or
3070 array type.
3071 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3072
928686b1
RS
30732018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3074 Alan Hayward <alan.hayward@arm.com>
3075 David Sherwood <david.sherwood@arm.com>
3076
3077 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3078 TYPE_VECTOR_SUBPARTS.
3079
85ec4feb
JJ
30802018-01-03 Jakub Jelinek <jakub@redhat.com>
3081
3082 Update copyright years.
3083
913884f7
JJ
30842018-01-01 Jakub Jelinek <jakub@redhat.com>
3085
3086 PR c/83595
3087 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3088 c_parser_conditional_expression, c_parser_cast_expression,
3089 c_parser_sizeof_expression, c_parser_alignof_expression,
3090 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3091 c_parser_transaction_expression): Use set_error () method instead
3092 of setting value member to error_mark_node.
3093
c6cfa2bf
MM
30942017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3095
3096 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3097 and _Float<N>X built-in functions.
3098
11d29d63
JJ
30992017-12-22 Jakub Jelinek <jakub@redhat.com>
3100
14ec014e
JJ
3101 PR debug/83550
3102 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3103 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3104 incomplete vars rather than after it.
3105
11d29d63
JJ
3106 PR debug/83547
3107 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3108 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3109 and consider empty ones if there are no other stmts. For
3110 -Wunused-value walk all statements before the one only followed by
3111 DEBUG_BEGIN_STMTs.
3112
170a8bd6 31132017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3114 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3115
3116 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3117 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3118 (c_parser_do_statement): Likewise.
3119 (c_parser_for_statement): Likewise.
3120 (c_parser_statement_after_labels): Adjust calls to above.
3121 (c_parse_pragma_ivdep): New static function.
3122 (c_parser_pragma_unroll): Likewise.
3123 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3124 <PRAGMA_UNROLL>: New case.
3125
01512446
JJ
31262017-12-19 Jakub Jelinek <jakub@redhat.com>
3127
3128 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3129 perform_integral_promotions, digest_init): Replace Yoda conditions
3130 with typical order conditions.
3131 * c-decl.c (check_bitfield_type_and_width): Likewise.
3132
c65e18d3
BE
31332017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3134
3135 * c-typeck.c (c_safe_arg_type_equiv_p,
3136 c_safe_function_type_cast_p): New function.
3137 (build_c_cast): Implement -Wcast-function-type.
3138
b7280579
RB
31392017-12-14 Richard Biener <rguenther@suse.de>
3140
3141 PR c/83415
3142 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3143 like REALPART_EXPR for the behavior of whether its operand
3144 is an lvalue.
3145
49e6a6c0
MP
31462017-12-12 Marek Polacek <polacek@redhat.com>
3147
3148 PR c/82679
3149 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3150
ab20d992 31512017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3152
3153 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3154 * c-parser.c (add_debug_begin_stmt): New.
3155 (c_parser_declaration_or_fndef): Call it.
3156 (c_parser_compound_statement_nostart): Likewise.
3157 (c_parser_statement_after_labels): Likewise.
3158 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3159
4b2b493f
JM
31602017-12-07 Joseph Myers <joseph@codesourcery.com>
3161
3162 * c-decl.c (build_compound_literal): Add parameter alignas_align
3163 and set alignment of decl if nonzero.
3164 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3165 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3166 qualifier.
3167 (c_parser_struct_declaration): Update syntax comment.
3168 (c_parser_type_name): Add alignas_ok argument and pass it to
3169 c_parser_declspecs.
3170 (c_parser_cast_expression): Pass true to c_parser_type_name and
3171 give error if a cast used an _Alignas specifier.
3172 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3173 give error if sizeof (type-name) used an _Alignas specifier.
3174 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3175 give error if _Alignof (type-name) used an _Alignas specifier.
3176 (c_parser_postfix_expression_after_paren_type): Check specified
3177 alignment for a compound literal and pass it to
3178 build_compound_literal.
3179 * c-parser.h (c_parser_type_name): Update prototype.
3180 * c-tree.h (build_compound_literal): Update prototype.
3181
5d9ae53d
MS
31822017-12-07 Martin Sebor <msebor@redhat.com>
3183
3184 PR c/81544
3185 * c-decl.c (c_decl_attributes): Look up existing declaration and
3186 pass it to decl_attributes.
3187
c79144f8
DM
31882017-12-06 David Malcolm <dmalcolm@redhat.com>
3189
3190 PR c/83236
3191 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3192 reserved for use by the implementation.
3193
613bc14f
DM
31942017-12-06 David Malcolm <dmalcolm@redhat.com>
3195
3196 * c-decl.c: Include "c-family/c-spellcheck.h".
3197
05abad4c
ML
31982017-12-05 Martin Liska <mliska@suse.cz>
3199 Jakub Jelinek <jakub@redhat.com>
3200
3201 * c-typeck.c (pointer_diff): Add new argument and instrument
3202 pointer subtraction.
3203 (build_binary_op): Similar for pointer comparison.
3204
cc6534d4
JJ
32052017-12-01 Jakub Jelinek <jakub@redhat.com>
3206
65791f42
JJ
3207 PR c/79153
3208 * c-parser.c: Include tree-iterator.h.
3209 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3210 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3211 on it.
3212
cc6534d4
JJ
3213 PR c/83222
3214 * c-tree.h (decl_constant_value_1): Declare.
3215 * c-typeck.c (decl_constant_value_1): New function.
3216 (decl_constant_value): Use it.
3217 * c-fold.c (c_fully_fold_internal): If in_init, use
3218 decl_constant_value_1 instead of decl_constant_value.
3219
5de73c05
JJ
32202017-11-30 Jakub Jelinek <jakub@redhat.com>
3221
3222 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3223
058f0b9e
JJ
32242017-11-28 Jakub Jelinek <jakub@redhat.com>
3225
3226 PR sanitizer/81275
3227 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3228 c_switch_covers_all_cases_p returns true.
3229
5e9d6aa4 32302017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3231 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3232
3233 * Make-lang.in (c/c-array-notation.o): Remove.
3234 * c-array-notation.c: Delete.
3235 * c-decl.c: Remove cilkplus condition.
3236 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3237 c_parser_cilk_verify_simd, c_parser_array_notation,
3238 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3239 c_parser_cilk_simd_fn_vector_attrs,
3240 c_finish_cilk_simd_fn_tokens): Delete.
3241 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3242 (c_parser_direct_declarator_inner): Ditto.
3243 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3244 (c_parser_attributes, c_parser_compound_statement,
3245 c_parser_statement_after_labels, c_parser_if_statement,
3246 c_parser_switch_statement, c_parser_while_statement,
3247 c_parser_do_statement, c_parser_for_statement,
3248 c_parser_unary_expression, c_parser_postfix_expression,
3249 c_parser_postfix_expression_after_primary,
3250 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3251 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3252 support.
3253 * c-typeck.c (build_array_ref, build_function_call_vec,
3254 convert_arguments,
3255 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3256 c_finish_loop, build_binary_op): Remove cilkplus support.
3257
9e851845
JJ
32582017-11-28 Jakub Jelinek <jakub@redhat.com>
3259
3260 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3261 of build3.
3262
ab20d992 32632017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3264
3265 * Make-lang.in (c.install-plugin): Install backend import library.
3266
41521dee
JJ
32672017-11-23 Jakub Jelinek <jakub@redhat.com>
3268
3269 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3270 pragma_stmt context.
3271
ac9effed
EB
32722017-11-23 Mike Stump <mikestump@comcast.net>
3273 Eric Botcazou <ebotcazou@adacore.com>
3274
3275 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3276 ANNOTATE_EXPR.
3277 (c_parser_do_statement): Likewise.
3278 (c_parser_for_statement): Likewise.
3279
ce95abc4
DM
32802017-11-22 David Malcolm <dmalcolm@redhat.com>
3281
3282 PR c++/62170
3283 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3284 bool to bool *. Within '%T' handling, if showing an "aka", use
3285 "quoted" param to add appropriate quoting.
3286
974aedcc
MP
32872017-11-22 Marek Polacek <polacek@redhat.com>
3288
3289 PR c++/60336
3290 PR middle-end/67239
3291 PR target/68355
3292 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3293
d4300cc6
DM
32942017-11-21 David Malcolm <dmalcolm@redhat.com>
3295
3296 PR c/83056
3297 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3298 earlier failed lookups.
3299
1af4ebf5
MG
33002017-11-21 Marc Glisse <marc.glisse@inria.fr>
3301
3302 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3303 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3304
26edace6
DM
33052017-11-20 David Malcolm <dmalcolm@redhat.com>
3306
3307 PR c/81404
3308 * c-decl.c: Include "c-family/known-headers.h".
3309 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3310 to known-headers.cc.
3311 (class suggest_missing_header): Move to known-header.h.
3312 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3313 than get_c_name_hint.
3314
b1212255
DM
33152017-11-20 David Malcolm <dmalcolm@redhat.com>
3316
3317 * c-decl.c (get_c_name_hint): New function.
3318 (class suggest_missing_header): New class.
3319 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3320 suggest missing headers to the user.
3321
6c7a259b
DM
33222017-11-20 David Malcolm <dmalcolm@redhat.com>
3323
3324 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3325 Include "c-family/name-hint.h"
3326 (implicit_decl_warning): Convert "hint" from
3327 const char * to name_hint. Pass location to
3328 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3329 warning was not printed.
3330 (undeclared_variable): Likewise for "guessed_id".
3331 (lookup_name_fuzzy): Convert return type from const char *
3332 to name_hint. Add location_t param.
3333 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3334 Include "c-family/name-hint.h"
3335 (c_parser_declaration_or_fndef): Convert "hint" from
3336 const char * to name_hint. Pass location to lookup_name_fuzzy.
3337 (c_parser_parameter_declaration): Likewise.
3338
f9c59f7e
JJ
33392017-11-19 Jakub Jelinek <jakub@redhat.com>
3340
3341 PR c/66618
3342 PR c/69960
3343 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3344 where needed.
3345 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3346 handle_omp_array_sections): Likewise.
3347 (digest_init): Don't call decl_constant_value_for_optimization.
3348 * c-tree.h (decl_constant_value_for_optimization): Removed.
3349 * c-fold.c (c_fold_array_ref): New function.
3350 (c_fully_fold_internal): Add LVAL argument, propagate it through
3351 recursive calls. For VAR_P call decl_constant_value and
3352 unshare if not LVAL and either optimizing or IN_INIT. Remove
3353 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3354 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3355 (c_fully_fold): Add LVAL argument, pass it through to
3356 c_fully_fold_internal.
3357 (decl_constant_value_for_optimization): Removed.
3358
3ca0dc60
JM
33592017-11-15 Joseph Myers <joseph@codesourcery.com>
3360
3361 PR c/81156
3362 * c-parser.c (check_tgmath_function): New function.
3363 (enum tgmath_parm_kind): New enum.
3364 (c_parser_postfix_expression): Handle __builtin_tgmath.
3365
64a5912c
DM
33662017-10-31 David Malcolm <dmalcolm@redhat.com>
3367
3368 * c-decl.c (implicit_decl_warning): Update for renaming of
3369 pedwarn_at_rich_loc and warning_at_rich_loc.
3370 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3371 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3372 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3373 (c_parser_struct_or_union_specifier): Likewise for renaming of
3374 pedwarn_at_rich_loc.
3375 (c_parser_parameter_declaration): Likewise for renaming of
3376 error_at_rich_loc.
3377 * c-typeck.c (build_component_ref): Likewise.
3378 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3379 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3380 (set_init_label): Likewise for renaming of error_at_rich_loc.
3381
c1136864
RB
33822017-10-30 Richard Biener <rguenther@suse.de>
3383
3384 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3385 stmts.
3386
ee5fd23a
MM
33872017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3388
3389 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3390 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3391
1a59ccf2
DM
33922017-10-25 David Malcolm <dmalcolm@redhat.com>
3393
3394 PR c/7356
3395 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3396 semicolons.
3397
bc1a75dd
JJ
33982017-10-25 Jakub Jelinek <jakub@redhat.com>
3399
3400 PR libstdc++/81706
3401 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3402 newdecl to corresponding __builtin_ if any.
3403
ff1ff960
PC
34042017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3405
3406 PR c++/82466
3407 * c-decl.c (diagnose_mismatched_decls): Use
3408 OPT_Wbuiltin_declaration_mismatch.
3409
62e1c678
DM
34102017-10-12 David Malcolm <dmalcolm@redhat.com>
3411
3412 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3413 use it to guard calls to maybe_suggest_missing_token_insertion.
3414 (c_parser_parms_list_declarator): Override default value of new
3415 "type_is_unique" param to c_parser_require.
3416 (c_parser_asm_statement): Likewise.
3417 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3418 defaulting to true.
3419
a92f6726
NS
34202017-10-11 Nathan Sidwell <nathan@acm.org>
3421
3422 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3423
8e6cdc90
RS
34242017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3425
3426 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3427 operating on trees as wide_ints.
3428 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3429 (c_tree_equal): Likewise.
3430
8139a48e
DM
34312017-10-04 David Malcolm <dmalcolm@redhat.com>
3432
3433 * c-decl.c (push_parm_decl): Store c_parm's location into the
3434 PARAM_DECL.
3435 (build_c_parm): Add "loc" param and store it within the c_parm.
3436 * c-parser.c (struct c_parser): Add "last_token_location" field.
3437 (c_parser_consume_token): Store location of the token into the
3438 new field.
3439 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3440 when handling a FUNCTION_DECL, if it doesn't already have them.
3441 (c_parser_parameter_declaration): Generate a location for the
3442 parameter, and pass it to the call to build_c_parm.
3443 * c-tree.h (struct c_parm): Add field "loc".
3444 (build_c_parm): Add location_t param.
3445 * c-typeck.c (get_fndecl_argument_location): New function.
3446 (inform_for_arg): New function.
3447 (convert_for_assignment): Use inform_for_arg when dealing with
3448 ic_argpass.
3449
2a389958
JJ
34502017-09-29 Jakub Jelinek <jakub@redhat.com>
3451
7d386d45
JJ
3452 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3453 width is non-NULL.
3454 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3455 don't SET_DECL_C_BIT_FIELD here.
3456
2a389958
JJ
3457 PR c/82340
3458 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3459 instead of trying to set just TREE_READONLY manually.
3460
ebc6a85e
TV
34612017-09-16 Tom de Vries <tom@codesourcery.com>
3462
3463 PR c/81875
3464 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3465 cond itself.
3466
bb75facd
JM
34672017-09-15 Joseph Myers <joseph@codesourcery.com>
3468
3469 PR c/82071
3470 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3471 for C11.
3472 (build_conditional_expr): For C11, generate result with excess
3473 precision when one argument is an integer and the other is of a
3474 type using excess precision.
3475
1d933576
BE
34762017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3477
3478 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3479
267bbb6f
MP
34802017-09-13 Marek Polacek <polacek@redhat.com>
3481
3482 PR c/82167
3483 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3484 than expr.original_type.
3485
6836632e
NS
34862017-09-12 Nathan Sidwell <nathan@acm.org>
3487
3488 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3489 resort_sorted_fields): Moved from c-family/c-common.c.
3490 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3491
e035be33
JM
34922017-09-01 Joseph Myers <joseph@codesourcery.com>
3493
3494 PR c/82071
3495 * c-typeck.c (build_atomic_assign): Handle argument with excess
3496 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3497 argument passed to build_binary_op and convert_for_assignment but
3498 not for call to c_fully_fold.
3499 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3500 Ensure build_binary_op is called with argument with original
3501 semantic type. Avoid calling c_fully_fold with an
3502 EXCESS_PRECISION_EXPR from build_binary_op.
3503
d2e05fcb
JJ
35042017-09-01 Jakub Jelinek <jakub@redhat.com>
3505
3506 PR c/81887
3507 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3508
b397965c
RS
35092017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3510 Alan Hayward <alan.hayward@arm.com>
3511 David Sherwood <david.sherwood@arm.com>
3512
3513 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3514 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3515 m1 and m2 to the signed equivalent of a fixed-point
3516 SCALAR_TYPE_MODE.
3517
14e18d71
DM
35182017-08-24 David Malcolm <dmalcolm@redhat.com>
3519
3520 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3521 than CAN_HAVE_LOCATION_P when determining whether to use the
3522 location_t value within "value".
3523
7f204c0f
DM
35242017-08-21 David Malcolm <dmalcolm@redhat.com>
3525
3526 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3527 rather than peeking the location of the first token.
3528 * c-tree.h (c_expr::get_location): New method.
3529
2f687306
DM
35302017-08-21 David Malcolm <dmalcolm@redhat.com>
3531
3532 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3533 to check_function_arguments.
3534
3e7b80d7
MP
35352017-08-18 Marek Polacek <polacek@redhat.com>
3536
3537 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3538 commentary.
3539
00aa1fa2
L
35402017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3541
3542 PR c/53037
3543 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3544 (check_bitfield_type_and_width): Don't allow bit-field with
3545 warn_if_not_aligned type.
3546
da67acb9
MS
35472017-08-14 Martin Sebor <msebor@redhat.com>
3548
3549 PR c/81117
3550 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3551
bb85aa74
MP
35522017-08-11 Marek Polacek <polacek@redhat.com>
3553
3554 PR c/81795
3555 * c-decl.c (pushtag): Only print inform if the warning was printed.
3556 (grokdeclarator): Likewise.
3557
32129a17
DM
35582017-08-10 David Malcolm <dmalcolm@redhat.com>
3559
3560 * c-parser.c (c_parser_error): Rename to...
3561 (c_parser_error_richloc): ...this, making static, and adding
3562 "richloc" parameter, passing it to the c_parse_error call,
3563 rather than calling c_parser_set_source_position_from_token.
3564 (c_parser_error): Reintroduce, reimplementing in terms of the
3565 above, converting return type from void to bool.
3566 (class token_pair): New class.
3567 (struct matching_paren_traits): New struct.
3568 (matching_parens): New typedef.
3569 (struct matching_brace_traits): New struct.
3570 (matching_braces): New typedef.
3571 (get_matching_symbol): New function.
3572 (c_parser_require): Add param MATCHING_LOCATION, using it to
3573 highlight matching "opening" tokens for missing "closing" tokens.
3574 (c_parser_skip_until_found): Likewise.
3575 (c_parser_static_assert_declaration_no_semi): Convert explicit
3576 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3577 class matching_parens, so that the pertinent open parenthesis is
3578 highlighted when there are problems locating the close
3579 parenthesis.
3580 (c_parser_struct_or_union_specifier): Likewise.
3581 (c_parser_typeof_specifier): Likewise.
3582 (c_parser_alignas_specifier): Likewise.
3583 (c_parser_simple_asm_expr): Likewise.
3584 (c_parser_braced_init): Likewise, for matching_braces.
3585 (c_parser_paren_condition): Likewise, for matching_parens.
3586 (c_parser_switch_statement): Likewise.
3587 (c_parser_for_statement): Likewise.
3588 (c_parser_asm_statement): Likewise.
3589 (c_parser_asm_operands): Likewise.
3590 (c_parser_cast_expression): Likewise.
3591 (c_parser_sizeof_expression): Likewise.
3592 (c_parser_alignof_expression): Likewise.
3593 (c_parser_generic_selection): Likewise.
3594 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3595 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3596 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3597 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3598 c_parser_skip_until_found call.
3599 (c_parser_objc_class_definition): Use class matching_parens as
3600 above.
3601 (c_parser_objc_method_decl): Likewise.
3602 (c_parser_objc_try_catch_finally_statement): Likewise.
3603 (c_parser_objc_synchronized_statement): Likewise.
3604 (c_parser_objc_at_property_declaration): Likewise.
3605 (c_parser_oacc_wait_list): Likewise.
3606 (c_parser_omp_var_list_parens): Likewise.
3607 (c_parser_omp_clause_collapse): Likewise.
3608 (c_parser_omp_clause_default): Likewise.
3609 (c_parser_omp_clause_if): Likewise.
3610 (c_parser_omp_clause_num_threads): Likewise.
3611 (c_parser_omp_clause_num_tasks): Likewise.
3612 (c_parser_omp_clause_grainsize): Likewise.
3613 (c_parser_omp_clause_priority): Likewise.
3614 (c_parser_omp_clause_hint): Likewise.
3615 (c_parser_omp_clause_defaultmap): Likewise.
3616 (c_parser_oacc_single_int_clause): Likewise.
3617 (c_parser_omp_clause_ordered): Likewise.
3618 (c_parser_omp_clause_reduction): Likewise.
3619 (c_parser_omp_clause_schedule): Likewise.
3620 (c_parser_omp_clause_num_teams): Likewise.
3621 (c_parser_omp_clause_thread_limit): Likewise.
3622 (c_parser_omp_clause_aligned): Likewise.
3623 (c_parser_omp_clause_linear): Likewise.
3624 (c_parser_omp_clause_safelen): Likewise.
3625 (c_parser_omp_clause_simdlen): Likewise.
3626 (c_parser_omp_clause_depend): Likewise.
3627 (c_parser_omp_clause_map): Likewise.
3628 (c_parser_omp_clause_device): Likewise.
3629 (c_parser_omp_clause_dist_schedule): Likewise.
3630 (c_parser_omp_clause_proc_bind): Likewise.
3631 (c_parser_omp_clause_uniform): Likewise.
3632 (c_parser_omp_for_loop): Likewise.
3633 (c_parser_cilk_clause_vectorlength): Likewise.
3634 (c_parser_cilk_clause_linear): Likewise.
3635 (c_parser_transaction_expression): Likewise.
3636 * c-parser.h (c_parser_require): Add param matching_location with
3637 default UNKNOWN_LOCATION.
3638 (c_parser_error): Convert return type from void to bool.
3639 (c_parser_skip_until_found): Add param matching_location with
3640 default UNKNOWN_LOCATION.
3641
30af3a2b
MP
36422017-08-09 Marek Polacek <polacek@redhat.com>
3643
3644 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3645 * c-tree.h (build_external_ref): Update declaration.
3646 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3647 (build_external_ref): Change the type of a parameter to bool.
3648 (parser_build_binary_op): Use true/false instead of 1/0.
3649 (pointer_diff): Likewise.
3650 (build_modify_expr): Likewise.
3651 (set_designator): Change the type of a parameter to bool.
3652 (set_init_index): Use true/false instead of 1/0.
3653 (set_init_label): Likewise.
3654 (output_init_element): Change the type of a parameter to bool.
3655 (output_pending_init_elements): Use true/false instead of 1/0.
3656 (process_init_element): Likewise.
3657 (build_binary_op): Change the type of a parameter to bool.
3658
296c53ac
MP
36592017-08-09 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/81233
3662 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3663 Call emit_diagnostic_valist instead of pedwarn.
3664 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3665 Print the relevant types in diagnostics.
3666
a32c8316
MP
36672017-08-09 Marek Polacek <polacek@redhat.com>
3668
3669 PR c/81417
3670 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3671 build_conditional_expr.
a32c8316
MP
3672 * c-parser.c (c_parser_conditional_expression): Create locations for
3673 EXP1 and EXP2 from their source ranges. Pass the locations down to
3674 build_conditional_expr.
3675 * c-tree.h (build_conditional_expr): Update declaration.
3676 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3677 For -Wsign-compare, also print the types.
3678
314e6352
ML
36792017-08-08 Martin Liska <mliska@suse.cz>
3680
3681 * c-convert.c: Include header files.
3682 * c-typeck.c: Likewise.
3683
577eec56
ML
36842017-08-07 Martin Liska <mliska@suse.cz>
3685
3686 * c-parser.c (c_parser_attributes): Canonicalize name of an
3687 attribute.
3688
f7b6353a
MP
36892017-08-02 Marek Polacek <polacek@redhat.com>
3690
3691 PR c/81289
3692 * c-parser.c (c_parser_unary_expression): Use set_error.
3693
8a6eab34
MP
3694 PR c/81448
3695 PR c/81306
3696 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3697 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3698
ab20d992 36992017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3700 Martin Liska <mliska@suse.cz>
3701
3702 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3703 statement.
7fef86d3 3704
f34ebeb2
ML
37052017-07-31 Martin Liska <mliska@suse.cz>
3706
3707 PR sanitize/81530
3708 * c-convert.c (convert): Guard condition with flag_sanitize_p
3709 also with current_function_decl non-null equality.
3710 * c-decl.c (grokdeclarator): Likewise.
3711 * c-typeck.c (build_binary_op): Likewise.
3712
8595f67b
MP
37132017-07-25 Marek Polacek <polacek@redhat.com>
3714
3715 * c-decl.c (grokfield): Remove local variable.
3716
d49718d6
MP
37172017-07-25 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/81364
3720 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3721 macro expansion if the body is in { }.
3722 (c_parser_while_statement): Likewise.
3723 (c_parser_for_statement): Likewise.
3724
ff22eb12
NS
37252017-07-18 Nathan Sidwell <nathan@acm.org>
3726
3727 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3728
eea77d1f
DM
37292017-07-14 David Malcolm <dmalcolm@redhat.com>
3730
3731 * c-decl.c (implicitly_declare): When suggesting a missing
3732 #include, provide a fix-it hint.
3733
b6f43128
DM
37342017-07-06 David Malcolm <dmalcolm@redhat.com>
3735
3736 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3737 and call that instead.
3738 * c-tree.h (selftest::run_c_tests): New decl.
3739
3e2becc4
MP
37402017-06-26 Marek Polacek <polacek@redhat.com>
3741
3742 PR c/80116
3743 * c-parser.c (c_parser_if_body): Set the location of the
3744 body of the conditional after parsing all the labels. Call
3745 warn_for_multistatement_macros.
3746 (c_parser_else_body): Likewise.
3747 (c_parser_switch_statement): Likewise.
3748 (c_parser_while_statement): Likewise.
3749 (c_parser_for_statement): Likewise.
3750 (c_parser_statement): Add a default argument. Save the location
3751 after labels have been parsed.
3752 (c_parser_c99_block_statement): Likewise.
3753
343ae898
RB
37542017-06-19 Richard Biener <rguenther@suse.de>
3755
3756 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3757 negated _Literals to parse _Literal (int) -1.
3758
45b2222a
ML
37592017-06-13 Martin Liska <mliska@suse.cz>
3760
3761 PR sanitize/78204
3762 * c-convert.c (convert): Use sanitize_flags_p.
3763 * c-decl.c (grokdeclarator): Likewise.
3764 * c-typeck.c (convert_for_assignment): Likewise.
3765 (c_finish_return): Likewise.
3766 (build_binary_op): Likewise.
3767
8ab7005b
JJ
37682017-06-08 Jakub Jelinek <jakub@redhat.com>
3769
3770 PR c/81006
3771 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3772 to sizetype before size_binop.
3773
363dc72c
JJ
37742017-06-07 Jakub Jelinek <jakub@redhat.com>
3775
3776 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3777 of TDI_generic.
3778
dc949728
MP
37792017-06-06 Marek Polacek <polacek@redhat.com>
3780
3781 PR c/79983
3782 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3783 ref.
3784 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3785
40ffd95f
BE
37862017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3787
3788 * c-parser.c (c_parser_binary_expression): Implement the
3789 -Wsizeof_pointer_div warning.
3790 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3791 from a parenthesized expression.
3792 (c_parser_expr_list): Use c_last_sizeof_loc.
3793 * c-tree.h (c_last_sizeof_loc): New external.
3794 * c-typeck.c (c_last_sizeof_loc): New variable.
3795 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3796
9fc5e7a4
MM
37972017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3798
3799 PR testsuite/80580
3800 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3801
f012c8ef
DM
38022017-05-30 David Malcolm <dmalcolm@redhat.com>
3803
3804 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3805 parameters.
3806
3cd211af
MS
38072017-05-24 Martin Sebor <msebor@redhat.com>
3808
3809 PR c/80731
3810 * c-fold.c (c_fully_fold_internal): Adjust.
3811 * c-typeck.c (parser_build_unary_op): Adjust.
3812
fd71a9a2
TS
38132017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3814
3815 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3816 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3817 "VECTOR_LENGTH".
3818
92fa0f9e
MP
38192017-05-23 Marek Polacek <polacek@redhat.com>
3820
3821 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3822 quotes.
3823
d11c168a
JJ
38242017-05-22 Jakub Jelinek <jakub@redhat.com>
3825
3826 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3827 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3828 it returned invariant. Call tree_invariant_p unconditionally
3829 afterwards to decide whether to return expr or op0.
3830
58aca9d9
NS
38312017-05-22 Nathan Sidwell <nathan@acm.org>
3832
3833 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3834
7fd549d2
TS
38352017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3836
3837 * c-parser.c (c_parser_omp_clause_default): Handle
3838 "OMP_CLAUSE_DEFAULT_PRESENT".
3839
6ecd2339
BE
38402017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3841
3842 * config-lang.in (gtfiles): Add c-family/c-format.c.
3843
8a57ecff
NS
38442017-05-18 Nathan Sidwell <nathan@acm.org>
3845
3846 * c-decl.c (pushdecl_top_level): Delete unused function.
3847
6574d78e
MP
38482017-05-18 Marek Polacek <polacek@redhat.com>
3849
3850 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3851 (check_earlier_gotos): Likewise.
3852 (define_label): Likewise.
3853 (pending_xref_error): Likewise.
3854 (smallest_type_quals_location): Likewise.
3855 (grokdeclarator): Likewise.
3856 (grokparms): Likewise.
3857 (identifier_global_value): Likewise.
3858 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3859 (find_init_member): Likewise.
3860
e3455240
MP
38612017-05-18 Marek Polacek <polacek@redhat.com>
3862
3863 * c-decl.c (start_decl): Use false/true instead of 0/1.
3864 (grokdeclarator): Likewise.
3865 (finish_struct): Likewise.
3866 (start_function): Change the return type to bool. Use false/true
3867 instead of 0/1.
3868 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3869 * c-tree.h (start_function): Update.
3870 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3871 (set_designator): Change the return type to bool. Use false/true
3872 instead of 0/1.
3873
3fa8871b
MP
38742017-05-17 Marek Polacek <polacek@redhat.com>
3875
3876 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3877 * c-typeck.c: Likewise.
3878
142473df
MP
38792017-05-17 Marek Polacek <polacek@redhat.com>
3880
3881 PR sanitizer/80659
3882 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3883 DECL_IGNORED_P even for non-static compound literals.
3884
1a817418
ML
38852017-05-17 Martin Liska <mliska@suse.cz>
3886
3887 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3888 use it instead of int type.
3889
b2fa0a8b
MP
38902017-05-17 Marek Polacek <polacek@redhat.com>
3891
3892 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3893 call c_fully_fold.
3894 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3895 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3896 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3897 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3898 save_expr.
3899 (c_parser_conditional_expression): Likewise.
3900 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3901 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3902 (process_init_element): Likewise.
3903 (build_binary_op): Likewise.
3904 (handle_omp_array_sections_1): Likewise.
3905
1e47f02b
TS
39062017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3907
3908 * c-parser.c (c_parser_omp_clause_num_gangs)
3909 (c_parser_omp_clause_num_workers)
3910 (c_parser_omp_clause_vector_length): Merge functions into...
3911 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3912 all users.
3913
c24e924f
NS
39142017-05-11 Nathan Sidwell <nathan@acm.org>
3915
3916 * gimple-parser.c: Don't #include tree-dump.h.
3917
c587104e
MM
39182017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3919
3920 PR testsuite/80580
3921 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3922
67ac9a9d
MM
39232017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3924
3925 PR testsuite/80580
3926 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3927 incorrect __MEM syntax.
3928
ac4eb40f
MM
39292017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3930
3931 PR testsuite/80580
3932 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3933 type of unary '*'.
3934
641da50a
NS
39352017-05-09 Nathan Sidwell <nathan@acm.org>
3936
3937 * c-tree.h (pushdecl): Declare.
3938
56d35585
DM
39392017-05-05 David Malcolm <dmalcolm@redhat.com>
3940
3941 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3942 with diagnostic_report_diagnostic.
3943 * c-errors.c (pedwarn_c99): Likewise.
3944 (pedwarn_c90): Likewise.
3945
815d9cc6
XR
39462017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3947
92a285c1 3948 PR c++/80038
815d9cc6
XR
3949 * c-gimplify.c (c_gimplify_expr): Remove calls to
3950 cilk_gimplifY_call_params_in_spawned_fn.
3951
1c4ea66f
DM
39522017-04-25 David Malcolm <dmalcolm@redhat.com>
3953
3954 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3955 hint for removing extra semicolon.
3956
666f7903
JJ
39572017-04-21 Jakub Jelinek <jakub@redhat.com>
3958
3959 PR c/80468
3960 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3961 enabled, set specs->type to integer_type_node.
3962
5764ee3c
JW
39632017-04-03 Jonathan Wakely <jwakely@redhat.com>
3964
3965 * c-array-notation.c: Fix typo in comment.
3966
10fa8dfb
MP
39672017-03-29 Marek Polacek <polacek@redhat.com>
3968
3969 PR c/79730
3970 * c-decl.c (finish_decl): Check VAR_P.
3971
a9e4a1a5
JJ
39722017-03-27 Jakub Jelinek <jakub@redhat.com>
3973
3974 PR middle-end/80162
3975 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3976 * c-typeck.c (c_mark_addressable): Likewise. Look through
3977 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3978 to ARRAY_TYPE.
3979 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3980
ee3ff394
MP
39812017-03-23 Marek Polacek <polacek@redhat.com>
3982
3983 * c-tree.h: Remove a C_RID_YYCODE reference.
3984
4d1b8e70
JJ
39852017-03-21 Jakub Jelinek <jakub@redhat.com>
3986
3987 PR c/80097
3988 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3989 optional COMPOUND_EXPR with ubsan instrumentation.
3990
31dc71a8
MP
39912017-03-17 Marek Polacek <polacek@redhat.com>
3992
3993 * c-parser.c: Add C11 references.
3994
d579c385
MP
39952017-03-15 Marek Polacek <polacek@redhat.com>
3996
3997 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3998
85059a38
MP
39992017-03-11 Marek Polacek <polacek@redhat.com>
4000
4001 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4002
2f6f187a
DM
40032017-03-10 David Malcolm <dmalcolm@redhat.com>
4004
4005 PR translation/79848
4006 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4007 "%qs".
4008 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4009
36618428
MP
40102017-03-09 Marek Polacek <polacek@redhat.com>
4011
4012 PR sanitizer/79757
4013 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4014 parameter declarations with initializers.
4015
01e5af5a
JJ
40162017-03-09 Jakub Jelinek <jakub@redhat.com>
4017
4018 PR c/79969
4019 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4020 TYPE_STUB_DECL.
4021
a71dbc63
JJ
40222017-03-07 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR c/79834
4025 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4026 for "may only be used in compound statements" diagnostics, change it
4027 such that the same translatable string is used for all pragmas. For
4028 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4029 diagnostics.
4030 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4031 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4032 "may only be used in compound statements" diagnostics, such that the
4033 same translatable string is used for all pragmas.
4034
1ff4bae6
MP
40352017-03-04 Marek Polacek <polacek@redhat.com>
4036
4037 PR c/79847
4038 * c-decl.c (implicit_decl_warning): Add missing space.
4039
7f5a7d78
MP
40402017-03-03 Marek Polacek <polacek@redhat.com>
4041
4042 PR c/79758
4043 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4044 current_function_prototype_arg_types is error_mark_node. Fix
4045 formatting. Use TREE_VALUE instead of TREE_TYPE.
4046
883c8f06
JJ
40472017-03-03 Jakub Jelinek <jakub@redhat.com>
4048
79c9b7a8
JJ
4049 PR c/79837
4050 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4051 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4052 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4053 diagnostics.
4054
883c8f06
JJ
4055 PR c/79836
4056 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4057 instead of %<_Generic>.
4058 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4059 (c_parser_omp_target_exit_data): Use %<release%> instead of
4060 %<release>.
4061
324ff1a0
JJ
40622017-02-28 Jakub Jelinek <jakub@redhat.com>
4063
4064 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4065 instead of just cond ? "..." : "...".
4066 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4067 for "enter"/"exit" keyword.
4068 (c_finish_oacc_routine): Don't use %s to supply portions of the
4069 message.
4070
4227c9ad
JJ
40712017-02-24 Jakub Jelinek <jakub@redhat.com>
4072
4073 PR c++/79588
4074 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4075 handle -Wrestrict here.
4076 * c-typeck.c (build_function_call_vec): Adjust
4077 check_function_arguments caller.
4078
5d972e66
RB
40792017-02-23 Richard Biener <rguenther@suse.de>
4080
4081 PR c/79684
4082 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4083 to initialize c_exprs to return.
4084 (c_parser_gimple_binary_expression): Likewise.
4085 (c_parser_gimple_unary_expression): Likewise.
4086 (c_parser_gimple_postfix_expression): Likewise.
4087
61ac5ebe
MP
40882017-02-22 Marek Polacek <polacek@redhat.com>
4089
4090 PR c/79662
4091 * c-typeck.c (convert_arguments): Handle error_mark_node.
4092
41d1b0b1
PK
40932017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4094
4095 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4096 value of c_parser_parse_ssa_name against error_mark_node and emit
4097 error if ssa name is anonymous and written as default definition.
4098
eab1f169
PK
40992017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4100
4101 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4102 FMA_EXPR.
4103
bcac0b4d
JJ
41042017-02-16 Jakub Jelinek <jakub@redhat.com>
4105
4106 PR c++/79512
4107 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4108 ignore #pragma omp target even when not followed by identifier.
4109
1be33173
PK
41102017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4111
4112 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4113 (c_parser_gimple_unary_expression): Likewise.
4114
aa326bfb
JJ
41152017-02-13 Jakub Jelinek <jakub@redhat.com>
4116
4117 * c-parser.c (c_parser_oacc_declare): Add missing space in
4118 diagnostics.
4119
8a398bc5
PK
41202017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4121
4122 PR c/79478
4123 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4124 set_c_expr_source_range when parsing ssa-name.
4125
3dcde5ef 41262017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4127 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4128
4129 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4130 building IL when arguments are error_mark_node.
4131 (c_parser_gimple_unary_expression): Likewise.
4132 (c_parser_gimple_if_stmt): Likewise.
4133 (c_parser_gimple_switch_stmt): Likewise.
4134 (c_parser_gimple_return_stmt): Likewise.
4135 (c_parser_parse_ssa_name): When name lookup fails do not build
4136 an SSA name. Use undeclared rather than not declared in error
4137 reporting.
4138
192b048b
MP
41392017-02-09 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/79428
4142 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4143 instead of c_parser_skip_until_found.
4144
56f71478
JJ
41452017-02-09 Jakub Jelinek <jakub@redhat.com>
4146
4147 PR c/79431
4148 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4149 symtab_node::get on automatic variables.
4150
02889d23
CLT
41512016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4152 Chung-Lin Tang <cltang@codesourcery.com>
4153
4154 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4155 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4156 semantic checking.
4157 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4158
7af4b20d
RB
41592017-02-07 Richard Biener <rguenther@suse.de>
4160
4161 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4162 (c_parser_gimple_postfix_expression_after_primary):
4163 Do not use c_build_function_call_vec to avoid folding and promotion.
4164 Simplify.
4165
e5e391d6
MO
41662017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4167
4168 PR lto/79061
4169 * c-decl.c (pop_scope): Pass main_input_filename to
4170 build_translation_unit_decl.
4171
c2e84327
DM
41722017-01-24 David Malcolm <dmalcolm@redhat.com>
4173
4174 * c-parser.c: Include "read-rtl-function.h" and
4175 "run-rtl-passes.h".
4176 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4177 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4178 production. Update for renaming of field "gimple_pass" to
4179 "gimple_or_rtl_pass". If __RTL was seen, call
4180 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4181 to an auto_timevar, to cope with early exit.
4182 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4183 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4184 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4185 Handle RID_RTL.
4186 (c_parser_parse_rtl_body): New function.
4187 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4188 (struct c_declspecs): Rename field "gimple_pass" to
4189 "gimple_or_rtl_pass". Add field "rtl_p".
4190 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4191 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4192 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4193 (c_parser_gimple_or_rtl_pass_list): ...this.
4194
2ebd93e1
MP
41952017-01-20 Marek Polacek <polacek@redhat.com>
4196
4197 PR c/64279
4198 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4199
b1c95bb5
RB
42002017-01-13 Richard Biener <rguenther@suse.de>
4201
4202 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4203 nops.
4204
25329913
RB
42052017-01-13 Richard Biener <rguenther@suse.de>
4206
4207 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4208 _Literal ( type-name ) number.
4209
6bb4ea5c
RB
42102017-01-12 Richard Biener <rguenther@suse.de>
4211
4212 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4213 __MEM.
4214
6b5b4e9c
JJ
42152017-01-11 Jakub Jelinek <jakub@redhat.com>
4216
4217 PR c++/72813
4218 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4219 PCH file.
4220
e3252775
RB
42212017-01-11 Richard Biener <rguenther@suse.de>
4222
4223 PR bootstrap/79052
4224 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4225 returns on parse errors.
4226
a9342885
MP
42272017-01-04 Marek Polacek <polacek@redhat.com>
4228
4229 PR c++/64767
4230 * c-parser.c (c_parser_postfix_expression): Mark zero character
4231 constants by setting original_type in c_expr.
4232 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4233 with a zero character constant.
4234 (char_type_p): New function.
4235
5dd9a9d0
DM
42362017-01-04 David Malcolm <dmalcolm@redhat.com>
4237
4238 * c-parser.c (c_parser_declaration_or_fndef): Create a
4239 rich_location at init_loc and parse it to start_init.
4240 (last_init_list_comma): New global.
4241 (c_parser_braced_init): Update last_init_list_comma when parsing
4242 commas. Pass it to pop_init_level. Pass location of closing
4243 brace to pop_init_level.
4244 (c_parser_postfix_expression_after_paren_type): Create a
4245 rich_location at type_loc and parse it to start_init.
4246 (c_parser_omp_declare_reduction): Likewise for loc.
4247 * c-tree.h (start_init): Add rich_location * param.
4248 (pop_init_level): Add location_t param.
4249 * c-typeck.c (struct initializer_stack): Add field
4250 "missing_brace_richloc".
4251 (start_init): Add richloc param, use it to initialize
4252 the stack node's missing_brace_richloc.
4253 (last_init_list_comma): New decl.
4254 (finish_implicit_inits): Pass last_init_list_comma to
4255 pop_init_level.
4256 (push_init_level): When finding missing open braces, add fix-it
4257 hints to the richloc.
4258 (pop_init_level): Add "insert_before" param and pass it
4259 when calling pop_init_level. Add fixits about missing
4260 close braces to any richloc. Use the richloc for the
4261 -Wmissing-braces warning.
4262 (set_designator): Pass last_init_list_comma to pop_init_level.
4263 (process_init_element): Likewise.
4264
cbe34bb5
JJ
42652017-01-01 Jakub Jelinek <jakub@redhat.com>
4266
4267 Update copyright years.
4268
d17680f3
JJ
42692016-12-21 Jakub Jelinek <jakub@redhat.com>
4270
0dba7960
JJ
4271 PR bootstrap/78817
4272 * c-typeck.c (build_function_call_vec): If check_function_arguments
4273 returns true, set TREE_NO_WARNING on CALL_EXPR.
4274
d17680f3
JJ
4275 PR c/77767
4276 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4277 to *expr instead of overwriting it.
4278
aa90531e
RB
42792016-12-20 Richard Biener <rguenther@suse.de>
4280
4281 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4282 error recovery.
4283 (c_parser_gimple_statement): Only build assigns for non-error
4284 stmts.
4285 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4286
629b3d75
MJ
42872016-12-14 Martin Jambor <mjambor@suse.cz>
4288
4289 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4290 omp-low.h.
4291 (c_finish_oacc_routine): Adjusted call to
4292 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4293 to use their new names.
4294 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4295 use its new name.
4296 (c_parser_oacc_update): Likewise.
4297 (c_parser_omp_simd): Likewise.
4298 (c_parser_omp_target_update): Likewise.
4299 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4300 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4301 name.
4302 (c_finish_omp_cancellation_point): Likewise.
4303 * gimple-parser.c: Do not include omp-low.h
4304
c5af52eb
CP
43052016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4306 James Norris <jnorris@codesourcery.com>
4307
4308 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4309 EXIT_DATA,WAIT} are not used in compound statements.
4310 (c_parser_oacc_enter_exit_data): Update diagnostics.
4311
48330c93
BE
43122016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4313
4314 PR c++/71973
4315 * c-decl.c (diagnose_mismatched_decls): Use
4316 OPT_Wbuiltin_declaration_mismatch here too.
4317
899ca90e 43182016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4319 Alan Hayward <alan.hayward@arm.com>
4320 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4321
4322 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4323 (make_label, finish_struct): Likewise.
4324
1ee62b92 43252016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4326 Richard Biener <rguenther@suse.de>
22b15758 4327
8e745a17
JJ
4328 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4329 * config-lang.in (gtfiles): Add c/c-parser.h.
4330 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4331 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4332 * c-parser.c (enum c_id_kind, struct c_token,
4333 c_parser_next_token_is, c_parser_next_token_is_not,
4334 c_parser_next_token_is_keyword,
4335 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4336 Split out to ...
4337 * c-parser.h: ... new header.
4338 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4339 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4340 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4341 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4342 c_parser_error, c_parser_require, c_parser_skip_until_found,
4343 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4344 c_parser_type_name): Export.
4345 (c_parser_tokens_buf): New function.
4346 (c_parser_error): Likewise.
4347 (c_parser_set_error): Likewise.
4348 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4349 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4350 via c_parser_parse_gimple_body.
8e745a17
JJ
4351 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4352 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4353 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4354 c_parser_error, c_parser_require, c_parser_skip_until_found,
4355 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4356 c_parser_type_name): Declare.
1ee62b92
PG
4357 (struct c_parser): Declare forward.
4358 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4359 (c_parser_error): Likewise.
4360 (c_parser_set_error): Likewise.
4361 * gimple-parser.c: New file.
4362 * gimple-parser.h: Likewise.
1ee62b92 4363
22b15758
UB
43642016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4365
4366 PR c/35503
4367 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4368 warn_for_restrict.
4369
84ff4775
LCW
43702016-09-11 Le-Chun Wu <lcwu@google.com>
4371 Mark Wielaard <mjw@redhat.com>
4372
4373 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4374 to the given -Wshadow= variant.
4375
4d0cdd0c
TP
43762016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4377
4378 * c-typeck.c: Include memmodel.h.
4379
1202f33e
JJ
43802016-10-13 Jakub Jelinek <jakub@redhat.com>
4381
4382 PR target/77957
4383 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4384 instead of lhd_return_null_tree_v.
4385
8a14afd0
BS
43862016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4387
4388 PR c++/69733
4389 * c-decl.c (smallest_type_quals_location): New static function.
4390 (grokdeclarator): Try to find the correct location for an ignored
4391 qualifier.
4392
81fea426
MP
43932016-09-26 Marek Polacek <polacek@redhat.com>
4394
4395 PR c/7652
4396 * c-decl.c (pop_scope): Add gcc_fallthrough.
4397
43982016-09-26 Marek Polacek <polacek@redhat.com>
4399
4400 PR c/7652
4401 * c-parser.c (struct c_token): Add flags field.
4402 (c_lex_one_token): Pass it to c_lex_with_flags.
4403 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4404 into IFN_FALLTHROUGH.
4405 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4406 attribute fallthrough after a case label or default label.
4407 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4408
9a2300e9
MP
44092016-09-24 Marek Polacek <polacek@redhat.com>
4410
4411 PR c/77490
4412 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4413 have boolean value. Warn about ++/-- on booleans.
4414
7de76362
JJ
44152016-09-23 Jakub Jelinek <jakub@redhat.com>
4416
4417 * c-parser.c (incomplete_record_decls): Remove unnecessary
4418 = vNULL initialization of file scope vec.
4419
5b73d2ab
MP
44202016-09-16 Marek Polacek <polacek@redhat.com>
4421
4422 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4423
e51fbec3
MP
44242016-09-14 Marek Polacek <polacek@redhat.com>
4425
4426 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4427 (fix_array_notation_expr): Likewise.
4428 * c-decl.c (finish_decl): Likewise.
4429 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4430 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4431 (function_to_pointer_conversion): Use false instead of 0.
4432 (convert_lvalue_to_rvalue): Likewise.
4433 (parser_build_unary_op): Likewise.
4434 (build_atomic_assign): Likewise.
4435 (build_unary_op): Change nonconvert parameter type to bool, use
4436 true/false instead of 1/0.
4437 (build_binary_op): Use true instead of 1.
4438
254830ba
DM
44392016-09-13 David Malcolm <dmalcolm@redhat.com>
4440
4441 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4442 of add_fixit_insert to add_fixit_insert_before.
4443
4c13ba17
MP
44442016-09-13 Marek Polacek <polacek@redhat.com>
4445
4446 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4447 it.
4448
54dcdb88
BE
44492016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4450
4451 PR c++/77496
4452 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4453 COMPOUND_EXPR to warn_for_omitted_condop.
4454
e5106e27
DM
44552016-09-07 David Malcolm <dmalcolm@redhat.com>
4456
4457 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4458 c_get_substring_location for this new langhook.
4459
9dc5773f
JJ
44602016-09-02 Jakub Jelinek <jakub@redhat.com>
4461
4462 PR c/65467
4463 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4464 flag_openmp.
4465 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4466 instead of mark_exp_read on low_bound/length expression.
4467 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4468 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4469 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4470 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4471 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4472 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4473 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4474 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4475 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4476 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4477 instead of mark_expr_read.
4478 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4479 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4480 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4481 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4482 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4483 array section bases outside of depend clause, for depend clause
4484 use convert_lvalue_to_rvalue on the base.
4485 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4486 linear, aligned, map, to and from clauses.
4487 (c_omp_clause_copy_ctor): New function.
4488
295844f6
MP
44892016-09-01 Marek Polacek <polacek@redhat.com>
4490
4491 PR c/7652
4492 * c-typeck.c (composite_type): Add FALLTHRU comment.
4493
089af25c
DM
44942016-08-31 David Malcolm <dmalcolm@redhat.com>
4495
4496 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4497 to the insertion fixits for "struct", "union", and "enum".
4498
f9087798
DM
44992016-08-30 David Malcolm <dmalcolm@redhat.com>
4500
4501 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4502 rather than add_fixit_misspelled_id.
4503 (undeclared_variable): Likewise.
4504 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4505 now-redundant "here" params from add_fixit_insert method calls.
4506 (c_parser_parameter_declaration): Likewise.
4507 * c-typeck.c (build_component_ref): Remove now-redundant range
4508 param from add_fixit_replace method calls.
4509
ebef225f
MP
45102016-08-25 Marek Polacek <polacek@redhat.com>
4511
4512 * c-typeck.c (parser_build_binary_op): Pass LHS to
4513 warn_logical_not_parentheses.
4514
fe377a48
MP
45152016-08-25 Marek Polacek <polacek@redhat.com>
4516
4517 PR c/77323
4518 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4519 or _FloatN or _FloatNx is not supported.
4520 (finish_declspecs): Set type to integer_type_node when _FloatN or
4521 _FloatNx is not supported.
4522
c65699ef
JM
45232016-08-19 Joseph Myers <joseph@codesourcery.com>
4524
4525 PR c/32187
4526 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4527 (struct c_declspecs): Add field floatn_nx_idx.
4528 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4529 and _FloatNx type specifiers.
4530 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4531 (c_parser_declspecs, c_parser_attribute_any_word)
4532 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4533 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4534 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4535 narrower than double.
4536
2f1364c2
JJ
45372016-08-12 Jakub Jelinek <jakub@redhat.com>
4538 Martin Liska <mliska@suse.cz>
4539
4540 PR c/67410
4541 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4542 % to determine val element to change. Assert that
4543 wchar_bytes * charwidth fits into val array.
4544
191816a3
MP
45452016-08-12 Marek Polacek <polacek@redhat.com>
4546
4547 PR c/7652
4548 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4549 (c_parser_postfix_expression): Likewise.
4550 * c-typeck.c (build_unary_op): Adjust fall through comment.
4551 (c_mark_addressable): Likewise.
4552
b95a64bb
JJ
45532016-08-11 Jakub Jelinek <jakub@redhat.com>
4554
4555 PR c/72816
4556 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4557 array member through typedef, for orig_qual_indirect == 0 clear
4558 orig_qual_type.
4559
895aa8e1
DM
45602016-08-08 David Malcolm <dmalcolm@redhat.com>
4561
4562 PR c/64955
4563 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4564 this up to selftest::run_c_tests.
4565 (selftest::run_c_tests): New function.
4566
0b212d8c
TS
45672016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4568
ae9281fc
TS
4569 * c-parser.c (struct oacc_routine_data): Add error_seen and
4570 fndecl_seen members.
4571 (c_finish_oacc_routine): Use these.
4572 (c_parser_declaration_or_fndef): Adjust.
4573 (c_parser_oacc_routine): Likewise. Support more C language
4574 constructs, and improve diagnostics. Move pragma context
4575 checking...
4576 (c_parser_pragma): ... here.
4577
0b212d8c
TS
4578 * c-parser.c (struct oacc_routine_data): New.
4579 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4580 Simplify code.
4581 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4582 declare target" attribute.
4583
76e2c821
JB
45842016-08-01 Jan Beulich <jbeulich@suse.com>
4585
4586 * c-fold.c (c_fully_fold_internal): Also emit shift count
4587 warnings for vector types.
4588 * c-typeck.c (build_binary_op): Likewise.
4589
f618a472
MP
45902016-07-29 Marek Polacek <polacek@redhat.com>
4591
4592 PR c/71742
4593 * c-decl.c (finish_struct): Rephrase an error message.
4594
efd0786f
MP
4595 PR c/71853
4596 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4597 to error node for invalid code.
4598
e00dceaf
MP
4599 PR c/71573
4600 * c-decl.c (implicitly_declare): Return decl early not only for
4601 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4602
673a107a
JJ
46032016-07-29 Jakub Jelinek <jakub@redhat.com>
4604
4605 PR c/71969
4606 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4607 on GNU extern inline functions.
4608
a5b5c8b6
MP
46092016-07-29 Marek Polacek <polacek@redhat.com>
4610
4611 PR c/71583
4612 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4613 check expr.value.
4614
e3fe09c1
UB
46152016-07-22 Uros Bizjak <ubizjak@gmail.com>
4616
4617 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4618
7c8f7eaa
DM
46192016-07-20 David Malcolm <dmalcolm@redhat.com>
4620
4621 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4622 spellcheck-tree.h
4623 (best_macro_match): Likewise, converting from a typedef to a
4624 subclass.
4625 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4626 (lookup_name_fuzzy): Update for change of best_macro_match to a
4627 subclass with a ctor that calls cpp_forall_identifiers.
4628
de6a69ee
DM
46292016-07-20 David Malcolm <dmalcolm@redhat.com>
4630
4631 * c-decl.c (implicit_decl_warning): Update for conversion of
4632 return type of lookup_name_fuzzy to const char *.
4633 (undeclared_variable): Likewise.
4634 (lookup_name_fuzzy): Convert return type from tree to
4635 const char *.
4636 * c-parser.c (c_parser_declaration_or_fndef): Update for
4637 conversion of return type of lookup_name_fuzzy to const char *.
4638 (c_parser_parameter_declaration): Likewise.
4639
b1c9c068
CP
46402016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4641
4642 * c-parser.c (c_parser_oacc_declare): Don't scan for
4643 GOMP_MAP_POINTER.
4644 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4645 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4646 zero-length subarrays.
4647
ddbbcb19
JJ
46482016-07-15 Jakub Jelinek <jakub@redhat.com>
4649
4650 PR c/71858
4651 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4652 instead of FUZZY_LOOKUP_NAME.
4653 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4654 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4655
dd36b877
JJ
46562016-07-14 Jakub Jelinek <jakub@redhat.com>
4657
4658 PR c/71858
4659 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4660
8c681247
TS
46612016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4662
4663 * c-parser.c (c_parser_generic_selection): Make type of variable
4664 auto_vec.
4665 (c_parser_omp_declare_simd): Likewise.
4666
bf4fa671
TS
46672016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4668
4669 * c-decl.c (struct c_struct_parse_info): Change member types
4670 from vec to auto_vec.
4671 (start_struct): Adjust.
4672 (finish_struct): Likewise.
4673
557e8c49
JJ
46742016-07-02 Jakub Jelinek <jakub@redhat.com>
4675
4676 PR c/71719
4677 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4678
54d19c3b
TS
46792016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4680
4681 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4682 Move pragma context checking into...
4683 (c_parser_omp_cancellation_point): ... here, and improve
4684 diagnostic messages.
4685 * c-typeck.c (c_finish_omp_cancel)
4686 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4687
152ef731
JJ
46882016-06-29 Jakub Jelinek <jakub@redhat.com>
4689
4690 PR c/71685
4691 * c-typeck.c (c_build_qualified_type): Don't clear
4692 C_TYPE_INCOMPLETE_VARS for the main variant.
4693
46942016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4695
4696 PR c/71552
4697 * c-typeck.c (output_init_element): Diagnose incompatible types
4698 before non-constant initializers.
4699
e9ac1f86
JJ
47002016-06-28 Jakub Jelinek <jakub@redhat.com>
4701
4702 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4703
277d7ee0
AK
47042016-06-23 Andi Kleen <ak@linux.intel.com>
4705
4706 * Make-lang.in: Add support for autofdo.
4707
1a4f11c8
DM
47082016-06-22 David Malcolm <dmalcolm@redhat.com>
4709
4710 PR c/70339
4711 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4712 (implicit_decl_warning): When issuing warnings for implicit
4713 declarations, attempt to provide a suggestion via
4714 lookup_name_fuzzy.
4715 (undeclared_variable): Likewise when issuing errors.
4716 (lookup_name_in_scope): Likewise.
4717 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4718 (best_macro_match): New typedef.
4719 (find_closest_macro_cpp_cb): New function.
4720 (lookup_name_fuzzy): New function.
4721 * c-parser.c: Include gcc-rich-location.h.
4722 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4723 (c_keyword_starts_typename): ...this new function.
4724 (c_parser_declaration_or_fndef): When issuing errors about
4725 missing "struct" etc, add a fixit. For other kinds of errors,
4726 attempt to provide a suggestion via lookup_name_fuzzy.
4727 (c_parser_parms_declarator): When looking ahead to detect typos in
4728 type names, also reject CPP_KEYWORD.
4729 (c_parser_parameter_declaration): When issuing errors about
4730 unknown type names, attempt to provide a suggestion via
4731 lookup_name_fuzzy.
4732 * c-tree.h (c_keyword_starts_typename): New prototype.
4733
5a578671
JM
47342016-06-20 Joseph Myers <joseph@codesourcery.com>
4735
4736 PR c/71601
4737 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4738 c_common_type returns error_mark_node.
4739
3f8257db 47402016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4741
4742 PR c/69507
4743 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4744 __alignof__ (expression).
4745
6a3f203c
DM
47462016-06-14 David Malcolm <dmalcolm@redhat.com>
4747
4748 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4749
264757fb
DM
47502016-06-14 David Malcolm <dmalcolm@redhat.com>
4751
4752 * c-typeck.c (build_component_ref): Simplify fixit code by
4753 using gcc_rich_location::add_fixit_misspelled_id.
4754 (set_init_label): Likewise.
4755
f7e4f2e3
DM
47562016-06-13 David Malcolm <dmalcolm@redhat.com>
4757
4758 * c-parser.c (c_parser_initelt): Provide location of name for new
4759 location_t param of set_init_label.
4760 * c-tree.h (set_init_label): Add location_t param.
4761 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4762 param and use it when issuing error messages about unrecognized
4763 field names. Attempt to provide a fixit hint if appropriate,
4764 otherwise update the error message to provide the type name.
4765
4b1ffdb1
TS
47662016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4767
4768 PR c/71381
4769 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4770 Loosen checking.
4771
44a845ca
MS
47722016-06-08 Martin Sebor <msebor@redhat.com>
4773 Jakub Jelinek <jakub@redhat.com>
4774
4775 PR c++/70507
4776 PR c/68120
4777 * c-typeck.c (convert_arguments): Don't promote last argument
4778 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4779
92a5f2ba
MP
47802016-06-08 Marek Polacek <polacek@redhat.com>
4781
4782 PR c/71418
4783 * c-decl.c (grokdeclarator): Check TYPE_P.
4784
08203f73
MP
4785 PR c/71426
4786 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4787 code.
4788
6ffd47b7
DM
47892016-06-07 David Malcolm <dmalcolm@redhat.com>
4790
4791 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4792 and structure element reference, capture the location of the
4793 element name token and pass it to build_component_ref.
4794 (c_parser_postfix_expression_after_primary): Likewise for
4795 structure element dereference.
4796 (c_parser_omp_variable_list): Likewise for
4797 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4798 * c-tree.h (build_component_ref): Add location_t param.
4799 * c-typeck.c (build_component_ref): Add location_t param
4800 COMPONENT_LOC. Use it, if available, when issuing hints about
4801 mispelled member names to provide a fixit replacement hint.
4802
1f40cff3
MP
48032016-06-06 Marek Polacek <polacek@redhat.com>
4804
4805 PR c/71362
4806 * c-parser.c (c_parser_direct_declarator): Set location.
4807
5545a907
MP
48082016-06-06 Marek Polacek <polacek@redhat.com>
4809
4810 * c-typeck.c (comptypes_internal): Handle comparisons of
4811 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4812 TYPE_REF_CAN_ALIAS_ALL.
4813
b605f663
CLT
48142016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4815
4816 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4817 arguments as addressable when async clause exists.
4818
00631022
JJ
48192016-05-30 Jakub Jelinek <jakub@redhat.com>
4820
4821 PR c++/71349
4822 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4823 when combined with target construct.
4824
7211a097
JJ
48252016-05-26 Jakub Jelinek <jakub@redhat.com>
4826
4827 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4828 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4829
95efe6b6
MP
48302016-05-25 Marek Polacek <polacek@redhat.com>
4831
4832 PR c/71265
4833 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4834
a23faf7a
MP
4835 PR c/71266
4836 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4837
e46c7770
CP
48382016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4839
4840 * c-parser.c (c_parser_oacc_declare): Add support for
4841 GOMP_MAP_FIRSTPRIVATE_POINTER.
4842 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4843 argument with enum c_omp_region_type ort.
4844 (handle_omp_array_sections): Likewise. Update call to
4845 handle_omp_array_sections_1.
4846 (c_finish_omp_clauses): Add specific errors and warning messages for
4847 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4848 call to handle_omp_array_sections.
4849
a04e69c0
TS
48502016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4851
4852 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4853
f17a223d
RB
48542016-05-24 Richard Biener <rguenther@suse.de>
4855
4856 PR middle-end/70434
4857 PR c/69504
4858 * c-typeck.c (build_array_ref): Do not complain about indexing
4859 non-lvalue vectors. Adjust for function name change.
4860
79063edd
MS
48612016-05-20 Martin Sebor <msebor@redhat.com>
4862
4863 PR c/71115
4864 * c-typeck.c (error_init): Use
4865 expansion_point_location_if_in_system_header.
4866 (warning_init): Same.
4867
8a40fef3
DM
48682016-05-19 David Malcolm <dmalcolm@redhat.com>
4869
4870 PR c/71171
4871 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4872 in error-handling.
4873 (c_parser_postfix_expression): Likewise.
4874 * c-tree.h (c_expr::set_error): New method.
4875 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4876 that result's range is initialized.
4877
e9892350
JG
48782016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4879
4880 * c-typeck.c (parser_build_unary_op): Fix formatting.
4881
8fad45f5
MW
48822016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4883
4884 * c-decl.c (grokdeclarator): Remove errmsg and use of
4885 targetm.invalid_return_type.
4886 (grokparms): Remove errmsg and use of
4887 targetm.invalid_parameter_type.
4888
aa4b467b
JM
48892016-05-13 Joseph Myers <joseph@codesourcery.com>
4890
4891 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4892 function return type.
4893
4f2e1536
MP
48942016-05-12 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/70756
4897 * c-decl.c (build_compound_literal): Pass LOC down to
4898 c_incomplete_type_error.
4899 * c-tree.h (require_complete_type): Adjust declaration.
4900 (c_incomplete_type_error): Likewise.
4901 * c-typeck.c (require_complete_type): Add location parameter, pass it
4902 down to c_incomplete_type_error.
4903 (c_incomplete_type_error): Add location parameter, pass it down to
4904 error_at.
4905 (build_component_ref): Pass location down to c_incomplete_type_error.
4906 (default_conversion): Pass location down to require_complete_type.
4907 (build_array_ref): Likewise.
4908 (build_function_call_vec): Likewise.
4909 (convert_arguments): Likewise.
4910 (build_unary_op): Likewise.
4911 (build_c_cast): Likewise.
4912 (build_modify_expr): Likewise.
4913 (convert_for_assignment): Likewise.
4914 (c_finish_omp_clauses): Likewise.
4915
d6e83a8d
MM
49162016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4917
4918 PR c/43651
4919 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4920 is enabled.
4921 * c-errors.c (pedwarn_c90): Return true if warned.
4922 * c-tree.h (pedwarn_c90): Change return type to bool.
4923 (enum c_declspec_word): Add new enumerator cdw_atomic.
4924
5c3a10fb
MP
49252016-05-11 Marek Polacek <polacek@redhat.com>
4926
4927 PR c++/71024
4928 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4929 diagnose_mismatched_attributes and call it.
4930
cf68d92c
MP
49312016-05-10 Marek Polacek <polacek@redhat.com>
4932
4933 PR c/70255
4934 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4935 on a declaration following the definition.
4936
351f85c5
JJ
49372016-05-05 Jakub Jelinek <jakub@redhat.com>
4938
4939 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4940 parse it through to c_parser_c99_block_statement.
4941 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4942 caller.
4943
deef7113
MP
49442016-05-04 Marek Polacek <polacek@redhat.com>
4945
4946 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4947 OPT_Wdangling_else.
4948
de55efd5
MP
49492016-05-04 Marek Polacek <polacek@redhat.com>
4950
4951 PR c/48778
4952 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4953 for macro expansions.
4954
79ce98bc
MP
49552016-05-03 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/70859
4958 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4959 check_builtin_function_arguments.
4960
fb2647aa
RB
49612016-05-03 Richard Biener <rguenther@suse.de>
4962
4963 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4964 the checksum from the previous stage.
4965
77886428
CP
49662016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4967
4968 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4969 c_finish_omp_clauses.
4970 (c_parser_omp_all_clauses): Likewise.
4971 (c_parser_oacc_cache): Likewise.
4972 (c_parser_oacc_loop): Likewise.
4973 (omp_split_clauses): Likewise.
4974 (c_parser_omp_declare_target): Likewise.
4975 (c_parser_cilk_all_clauses): Likewise.
4976 (c_parser_cilk_for): Likewise.
4977 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4978 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4979
7176a4a0
MP
49802016-05-02 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/70851
4983 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4984 incomplete type.
4985
e7ff0319
CP
49862016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4987
4988 PR middle-end/70626
4989 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4990 OACC_LOOP_CLAUSE_MASK.
4991 (c_parser_oacc_kernels_parallel): Update call to
4992 c_oacc_split_loop_clauses.
4993
9f405ce1
AM
49942016-04-28 Andrew MacLeod <amacleod@redhat.com>
4995
4996 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4997 argument to build_modify_expr in two cases.
4998
c1e1f433
BS
49992016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5000
5001 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5002 warn_for_memset instead of warning directly here.
5003
2448a956
MP
50042016-04-26 Marek Polacek <polacek@redhat.com>
5005
5006 PR c/67784
5007 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5008 out of ...
5009 (c_parser_for_statement): ... here.
5010 (c_parser_if_statement): Use it.
5011 (c_parser_switch_statement): Use it.
5012 (c_parser_while_statement): Use it.
5013
b02a5e26
MP
5014 PR c/70791
5015 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5016
477d4906
IV
50172016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5018
5019 PR c++/69363
5020 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5021 instead of c_finish_cilk_clauses.
5022 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5023 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5024 floating-point variables in the linear clause for Cilk Plus.
5025
fe37c7af
MM
50262016-04-18 Michael Matz <matz@suse.de>
5027
5028 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5029 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5030
949505a9
MP
50312016-04-15 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/70671
5034 * c-typeck.c (build_unary_op): Pass location down to error and
5035 warning call.
5036
dda1bf61
JJ
50372016-04-15 Jakub Jelinek <jakub@redhat.com>
5038
5039 PR c/70436
5040 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5041 where needed.
5042 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5043 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5044 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5045 Adjust c_parser_pragma callers.
5046 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5047 caller.
5048 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5049 c_parser_statement.
5050 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5051 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5052 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5053 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5054 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5055 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5056 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5057 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5058 down where needed.
5059 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5060 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5061 calls.
5062
99cd9857
MP
50632016-04-13 Marek Polacek <polacek@redhat.com>
5064
5065 PR c/70436
5066 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5067 adjust callers.
5068 (c_parser_statement): Likewise.
5069 (c_parser_c99_block_statement): Likewise.
5070 (c_parser_while_statement): Likewise.
5071 (c_parser_for_statement): Likewise.
5072 (c_parser_if_body): Don't set IF_P here.
5073 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5074 about dangling else here.
5075 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5076 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5077 warn about dangling else here.
5078
f13355da
MP
50792016-04-04 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/70307
5082 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5083
5fde6a45
MP
50842016-03-31 Marek Polacek <polacek@redhat.com>
5085
5086 PR c/70297
5087 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5088
4bbf545b
DM
50892016-03-18 David Malcolm <dmalcolm@redhat.com>
5090
5091 PR c/70281
5092 * c-parser.c (c_parser_postfix_expression): Set the source range
5093 for uses of "__builtin_types_compatible_p".
5094
fcc2b74f
JJ
50952016-03-17 Jakub Jelinek <jakub@redhat.com>
5096
5097 PR c/70280
5098 * c-typeck.c (composite_type): Don't count void_list_node
5099 into len, if the list is terminated by void_list_node, start
5100 with void_list_node instead of NULL for newargs. Stop
5101 at void_list_node.
5102
ab4c578f
MP
51032016-03-16 Marek Polacek <polacek@redhat.com>
5104
5105 PR c/70093
5106 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5107 nested functions returning VM types.
5108
96b3c82d
CP
51092016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5110
5111 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5112 when calling c_finish_omp_clauses.
5113
29b9828f
BS
51142016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5115
5116 PR c/69824
5117 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5118 for later.
5119
7ff6ca38
MP
51202016-03-04 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/69798
5123 * c-parser.c (c_parser_postfix_expression): Call
5124 c_parser_cast_expression rather than c_parser_postfix_expression.
5125
686e2237
JJ
51262016-03-01 Jakub Jelinek <jakub@redhat.com>
5127
5128 PR c/69796
5129 PR c/69974
5130 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5131 of incomplete decls to error_mark_node.
5132
0b05329b
MP
51332016-02-24 Marek Polacek <polacek@redhat.com>
5134
5135 PR c/69819
5136 * c-decl.c (finish_decl): Don't update the copy of the type of a
5137 different decl type.
5138
067fbd8b
JJ
51392016-02-23 Jakub Jelinek <jakub@redhat.com>
5140
5141 PR objc/69844
5142 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5143 in id_kind reclassification.
5144
bf14eba2
JJ
51452016-02-16 Jakub Jelinek <jakub@redhat.com>
5146
5147 PR c/69835
5148 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5149
ba539195
JN
51502016-02-16 James Norris <jnorris@codesourcery.com>
5151
5152 PR c/64748
5153 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5154
16595a1f
BS
51552016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5156
f48dfe98
BS
5157 * c-decl.c (build_null_declspecs): Zero the entire struct.
5158
16595a1f
BS
5159 PR c/69522
5160 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5161 callers changed. If nested_p is true, use it to call
5162 finish_implicit_inits.
5163 * c-tree.h (finish_implicit_inits): Declare.
5164 * c-typeck.c (finish_implicit_inits): New function. Move code
5165 from ...
5166 (push_init_level): ... here.
5167 (set_designator, process_init_element): Call finish_implicit_inits.
5168
66756373
JJ
51692016-02-11 Jakub Jelinek <jakub@redhat.com>
5170
5171 PR c/69768
5172 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5173 arguments for -Waddress warning.
5174
1066e9b5
JJ
51752016-02-04 Jakub Jelinek <jakub@redhat.com>
5176
5177 PR c/69669
5178 * c-decl.c (finish_enum): When honoring mode attribute,
5179 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5180
3a5d2ba4
JJ
51812016-01-29 Jakub Jelinek <jakub@redhat.com>
5182
5183 PR debug/69518
5184 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5185 all type variants, not just TYPE_MAIN_VARIANT.
5186
cbdd8ae0
JJ
51872016-01-27 Jakub Jelinek <jakub@redhat.com>
5188
5189 PR debug/66869
5190 * c-decl.c (c_write_global_declarations_1): Warn with
5191 warn_unused_function if static prototype without definition
5192 is not C_DECL_USED.
5193
fa74a4bc
MP
51942016-01-27 Marek Polacek <polacek@redhat.com>
5195
5196 PR c/68062
5197 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5198 to unsigned, if needed. Add -Wsign-compare warning.
5199
13f92e8d
JJ
52002016-01-26 Jakub Jelinek <jakub@redhat.com>
5201
5202 PR tree-optimization/69483
5203 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5204
cd8e73dc 52052016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5206
5207 PR c/24293
5208 * c-tree.h (incomplete_record_decls): Declare.
5209 * c-parser.c (incomplete_record_decls): Define.
5210 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5211 report error if any decl has zero size.
5212 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5213 or enum type to incomplete_record_decls.
5214
e6d6ec9e
TV
52152016-01-14 Tom de Vries <tom@codesourcery.com>
5216
5217 PR tree-optimization/68773
5218 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5219 set force_output.
5220
00083992
MP
52212016-01-14 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/69262
5224 * c-decl.c (grokdeclarator): Provide more information for invalid
5225 array declarations.
5226
7443cf13
DM
52272016-01-06 David Malcolm <dmalcolm@redhat.com>
5228
5229 * c-parser.c (c_parser_unary_expression): For dereferences, build
5230 a combined location before calling build_indirect_ref, so that
5231 error reports cover the full range, manually updating the c_expr
5232 src_range.
5233
6b131d5b
MP
52342016-01-06 Marek Polacek <polacek@redhat.com>
5235
5236 PR sanitizer/69099
5237 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5238 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5239 NULL.
5240
818ab71a
JJ
52412016-01-04 Jakub Jelinek <jakub@redhat.com>
5242
5243 Update copyright years.
5244
2fe0a208
MP
52452016-01-04 Marek Polacek <polacek@redhat.com>
5246
5247 PR c/68908
5248 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5249 optimization to use __atomic_fetch_* built-in if possible.
5250
c7b48c8a
TS
52512015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5252
5253 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5254 into...
5255 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5256 all users.
5257
fda5652f
MP
52582015-12-22 Marek Polacek <polacek@redhat.com>
5259
5260 PR c/69002
5261 * c-typeck.c (build_component_ref): Warn when acessing elements of
5262 atomic structures or unions.
5263
745e411d
DM
52642015-12-21 David Malcolm <dmalcolm@redhat.com>
5265
5266 * c-typeck.c: Include "gcc-rich-location.h".
5267 (build_binary_op): In the two places that call binary_op_error,
5268 create a gcc_rich_location and populate it with the location of
5269 the binary op and its two operands.
5270
94c40e19
DM
52712015-12-16 David Malcolm <dmalcolm@redhat.com>
5272
5273 * c-parser.c (c_parser_statement_after_labels): When calling
5274 c_finish_return, Use the return expression's location if it has
5275 one, falling back to the location of the first token within it.
5276 * c-typeck.c (c_finish_return): When issuing warnings about
5277 the incorrect presence/absence of a return value, issue a note
5278 showing the declaration of the function.
5279
de67c4c3
DM
52802015-12-16 David Malcolm <dmalcolm@redhat.com>
5281
5282 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5283 to 4.
5284 (c_parser_peek_nth_token): New function.
5285 (c_parser_peek_conflict_marker): New function.
5286 (c_parser_error): Detect conflict markers and report them as such.
5287
a10704e1
DM
52882015-12-16 David Malcolm <dmalcolm@redhat.com>
5289
5290 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5291 to preserve range information for the primary expression
5292 in the call to c_parser_postfix_expression_after_primary.
5293
8062bca6
DM
52942015-12-16 David Malcolm <dmalcolm@redhat.com>
5295
5296 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5297 expression location, falling back on the first token location,
5298 rather than always using the latter.
5299
d06f8b75
MP
53002015-12-16 Marek Polacek <polacek@redhat.com>
5301
5302 PR c/64637
5303 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5304 available.
5305
2994fb91
MP
53062015-12-15 Marek Polacek <polacek@redhat.com>
5307
5308 PR c/68907
5309 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5310 artificial decl.
5311
a1b93f8d
DM
53122015-12-08 David Malcolm <dmalcolm@redhat.com>
5313
5314 * c-parser.c (c_parser_alignof_expression): Capture location of
5315 closing parenthesis (if any), or of end of unary expression, and
5316 use it to build a src_range for the expression.
5317
46c6e1e2
DM
53182015-12-08 David Malcolm <dmalcolm@redhat.com>
5319
5320 PR c/68757
5321 * c-parser.c (c_parser_get_builtin_args): Add
5322 "out_close_paren_loc" param, and write back to it.
5323 (c_parser_postfix_expression): Capture the closing
5324 parenthesis location for RID_CHOOSE_EXPR,
5325 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5326 RID_BUILTIN_SHUFFLE and use it to set the source range
5327 for such expressions; within RID_BUILTIN_COMPLEX set
5328 the underlying location.
5329
66189108
MP
53302015-12-07 Marek Polacek <polacek@redhat.com>
5331
5332 PR c/68668
5333 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5334 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5335
f187980b
EB
53362015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5337
5338 * c-tree.h (c_build_va_arg): Adjust prototype.
5339 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5340 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5341 parameter, adjust throughout and issue an error if EXPR is a component
5342 with reverse storage order.
5343
4250754e
JM
53442015-12-02 Jason Merrill <jason@redhat.com>
5345
5346 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5347 (c_fully_fold_internal, decl_constant_value_for_optimization):
5348 Move from c-common.c.
5349 * c-tree.h: Declare decl_constant_value_for_optimization.
5350 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5351
e9e32ee6
JM
53522015-12-02 Joseph Myers <joseph@codesourcery.com>
5353
5354 PR c/68162
5355 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5356 following link from declarator to next declarator. Track original
5357 qualified type and pass it to c_build_qualified_type.
5358 * c-typeck.c (c_build_qualified_type): Add arguments
5359 orig_qual_type and orig_qual_indirect.
5360
ff7a55bf
TS
53612015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5362
5363 * c-parser.c (c_parser_omp_clause_name)
5364 (c_parser_oacc_all_clauses): Alphabetical sorting.
5365
657e4e47
JJ
53662015-12-02 Jakub Jelinek <jakub@redhat.com>
5367
5368 PR c/68533
5369 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5370 for diagnostics.
5371
37d5ad46
JB
53722015-12-01 Julian Brown <julian@codesourcery.com>
5373 Cesar Philippidis <cesar@codesourcery.com>
5374 James Norris <James_Norris@mentor.com>
5375
5376 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5377 (c_parser_oacc_clause_use_device): New function.
5378 (c_parser_oacc_all_clauses): Add use_device support.
5379 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5380 (c_parser_oacc_host_data): New function.
5381 (c_parser_omp_construct): Add host_data support.
5382 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5383 * c-typeck.c (c_finish_oacc_host_data): New function.
5384 (c_finish_omp_clauses): Add use_device support.
5385
a4850ce9
JH
53862015-11-29 Jan Hubicka <hubicka@ucw.cz>
5387
5388 PR c/67106
5389 * c-decl.c: Set TYPE_PACKED in variants.
5390
b58d3df2
ML
53912015-11-27 Martin Liska <mliska@suse.cz>
5392
5393 PR c++/68312
5394 * c-array-notation.c (fix_builtin_array_notation_fn):
5395 Use release_vec_vec instead of vec::release.
5396 (build_array_notation_expr): Likewise.
5397 (fix_conditional_array_notations_1): Likewise.
5398 (fix_array_notation_expr): Likewise.
5399 (fix_array_notation_call_expr): Likewise.
5400
aec17bfe
JJ
54012015-11-27 Jakub Jelinek <jakub@redhat.com>
5402
5403 PR c/63326
5404 * c-parser.c (c_parser_compound_statement_nostart): If
5405 last_label is true, use pragma_stmt instead of pragma_compound
5406 as second c_parser_pragma argument.
5407 (c_parser_omp_ordered, c_parser_omp_target_update,
5408 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5409 false as second argument to c_parser_skip_to_pragma_eol after
5410 diagnosing standalone directives used in pragma_stmt context.
5411
688c4de0
IV
54122015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5413
5414 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5415 with "if (ENABLE_OFFLOADING)".
5416
cbd03aee
DM
54172015-11-23 David Malcolm <dmalcolm@redhat.com>
5418
5419 PR objc/68438
5420 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5421 for various Objective-C constructs: Class.name syntax,
5422 @selector(), @protocol(), @encode(), and [] message syntax.
5423
a87a86e1
DM
54242015-11-20 David Malcolm <dmalcolm@redhat.com>
5425
5426 PR 62314
5427 * c-typeck.c (should_suggest_deref_p): New function.
5428 (build_component_ref): Special-case POINTER_TYPE when
5429 generating a "not a structure of union" error message, and
5430 suggest a "->" rather than a ".", providing a fix-it hint.
5431
8ece8dfb
DM
54322015-11-19 David Malcolm <dmalcolm@redhat.com>
5433
5434 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5435 candidate into a new function, find_closest_identifier.
5436
433068cc
MP
54372015-11-19 Marek Polacek <polacek@redhat.com>
5438
5439 PR c/68412
5440 * c-typeck.c (parser_build_binary_op): Properly handle
5441 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5442
bef08b71
DM
54432015-11-17 David Malcolm <dmalcolm@redhat.com>
5444
5445 * c-parser.c (set_c_expr_source_range): Bulletproof both
5446 overloaded implementations against NULL expr->value.
5447 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5448 values.
5449 (c_parser_unary_expression): Likewise when handling addresses of
5450 labels.
5451 (c_parser_postfix_expression): Likewise for statement expressions,
5452 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5453 __builtin_va_arg, and for __builtin_offset_of.
5454 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5455 src_range using the range of the braced initializer.
5456 (c_parser_transaction_expression): Set src_range for "ret" to a
5457 sane pair of values.
5458
fff77217
KY
54592015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5460
5461 * c-parser.c (c_finish_omp_declare_simd): Look for
5462 "simd" attribute as well. Update error message.
5463
1d899da2
TS
54642015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5465
5466 * c-parser.c (c_parser_omp_declare_target): Adjust.
5467
e4606348
JJ
54682015-11-14 Jakub Jelinek <jakub@redhat.com>
5469
5470 * c-typeck.c (c_finish_omp_clauses): Don't mark
5471 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5472
3e636daf
MP
54732015-11-14 Marek Polacek <polacek@redhat.com>
5474
5475 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5476 * c-typeck.c: Likewise.
5477
ebedc9a3
DM
54782015-11-13 David Malcolm <dmalcolm@redhat.com>
5479
5480 * c-decl.c (warn_defaults_to): Pass line_table to
5481 rich_location ctor.
5482 * c-errors.c (pedwarn_c99): Likewise.
5483 (pedwarn_c90): Likewise.
5484 * c-parser.c (set_c_expr_source_range): New functions.
5485 (c_token::get_range): New method.
5486 (c_token::get_finish): New method.
5487 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5488 based on the range from the start of the LHS to the end of the
5489 RHS.
5490 (c_parser_conditional_expression): Likewise, based on the range
5491 from the start of the cond.value to the end of exp2.value.
5492 (c_parser_binary_expression): Call set_c_expr_source_range on
5493 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5494 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5495 based on the cast_loc through to the end of the expr.
5496 (c_parser_unary_expression): Likewise, based on the
5497 op_loc through to the end of op.
5498 (c_parser_sizeof_expression) Likewise, based on the start of the
5499 sizeof token through to either the closing paren or the end of
5500 expr.
5501 (c_parser_postfix_expression): Likewise, using the token range,
5502 or from the open paren through to the close paren for
5503 parenthesized expressions.
5504 (c_parser_postfix_expression_after_primary): Likewise, for
5505 various kinds of expression.
5506 * c-tree.h (struct c_expr): Add field "src_range".
5507 (c_expr::get_start): New method.
5508 (c_expr::get_finish): New method.
5509 (set_c_expr_source_range): New decls.
5510 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5511 on ret for prefix unary ops.
5512 (parser_build_binary_op): Likewise, running from the start of
5513 arg1.value through to the end of arg2.value.
5514
ec8b536f
MP
55152015-11-13 Marek Polacek <polacek@redhat.com>
5516
5517 PR c/68320
5518 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5519
277fe616
DM
55202015-11-13 David Malcolm <dmalcolm@redhat.com>
5521
5522 * c-typeck.c: Include spellcheck.h.
5523 (lookup_field_fuzzy_find_candidates): New function.
5524 (lookup_field_fuzzy): New function.
5525 (build_component_ref): If the field was not found, try using
5526 lookup_field_fuzzy and potentially offer a suggestion.
5527
6e232ba4
JN
55282015-11-12 James Norris <jnorris@codesourcery.com>
5529 Joseph Myers <joseph@codesourcery.com>
5530
5531 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5532 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5533 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5534 and PRAGMA_OMP_CLAUSE_LINK.
5535 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5536 and PRAGMA_OACC_CLAUSE_LINK.
5537 (OACC_DECLARE_CLAUSE_MASK): New definition.
5538 (c_parser_oacc_declare): New function.
5539
9be4f715
MP
55402015-11-12 Marek Polacek <polacek@redhat.com>
5541
5542 PR c/67784
5543 * c-parser.c (c_parser_for_statement): Reclassify the token in
5544 a correct scope.
5545
e78bede6
MP
55462015-11-11 Marek Polacek <polacek@redhat.com>
5547
5548 PR c/68107
5549 PR c++/68266
5550 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5551 checking the size of an array.
5552
69f293c9
AM
55532015-11-11 Andrew MacLeod <amacleod@redhat.com>
5554
5555 * c-array-notation.c: Remove unused header files.
5556 * c-aux-info.c: Likewise.
5557 * c-convert.c: Likewise.
5558 * c-decl.c: Likewise.
5559 * c-errors.c: Likewise.
5560 * c-lang.c: Likewise.
5561 * c-objc-common.c: Likewise.
5562 * c-parser.c: Likewise.
5563 * c-typeck.c: Likewise.
5564 * gccspec.c: Likewise.
5565
3a40d81d
NS
55662015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5567 Cesar Philippidis <cesar@codesourcery.com>
5568 James Norris <jnorris@codesourcery.com>
5569 Julian Brown <julian@codesourcery.com>
5570 Nathan Sidwell <nathan@codesourcery.com>
5571
3a40d81d
NS
5572 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5573 routine arg.
5574 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5575 (c_parser_pragma): Parse 'acc routine'.
5576 (OACC_ROUTINE_CLAUSE_MARK): Define.
5577 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5578
fc402eec
AA
55792015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5580
5581 PR debug/67192
5582 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5583 location of the backward-goto to the start of the loop body.
5584
f6b0b3db
AA
55852015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5586
5587 PR debug/67192
5588 * c-parser.c (c_parser_while_statement): Finish the loop before
5589 parsing ahead for misleading indentation.
5590 (c_parser_for_statement): Likewise.
5591
ee45a32d
EB
55922015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5593
5594 * c-decl.c (finish_struct): If the structure has reverse storage
5595 order, rewrite the type of array fields with scalar component. Call
5596 maybe_apply_pragma_scalar_storage_order on entry.
5597 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5598 errors on bit-fields and reverse SSO here and not...
5599 (c_mark_addressable): ...here.
5600 (output_init_element): Adjust call to initializer_constant_valid_p.
5601 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5602
8a645150
DM
56032015-11-06 David Malcolm <dmalcolm@redhat.com>
5604
5605 * c-decl.c (warn_defaults_to): Update for change in signature
5606 of diagnostic_set_info.
5607 * c-errors.c (pedwarn_c99): Likewise.
5608 (pedwarn_c90): Likewise.
5609 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5610 for textinfo::set_location.
5611
7a5e4956
CP
56122015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5613 Thomas Schwinge <thomas@codesourcery.com>
5614 James Norris <jnorris@codesourcery.com>
5615
5616 * c-parser.c (c_parser_omp_clause_name): Add support for
5617 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5618 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5619 default(none) in OpenACC.
5620 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5621 arguments.
5622 (c_parser_oacc_clause_tile): New function.
5623 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5624 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5625 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5626 TILE}.
5627 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5628 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5629 FIRSTPRIVATE}.
5630 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5631 (c_parser_oacc_update): Update the error message for missing clauses.
5632 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5633 and OMP_CLAUSE_INDEPENDENT.
5634
bfcfbfa0
MP
56352015-11-05 Marek Polacek <polacek@redhat.com>
5636
5637 PR c/68090
5638 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5639 deal with pre-evaluation on invalid types.
5640
e01d41e5
JJ
56412015-11-05 Jakub Jelinek <jakub@redhat.com>
5642 Ilya Verbin <ilya.verbin@intel.com>
5643
5644 * c-parser.c: Include context.h and gimple-expr.h.
5645 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5646 monotonic together with nonmonotonic.
5647 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5648 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5649 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5650 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5651 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5652 expressions on combined target teams before the target.
5653 (c_parser_omp_declare_target): If decl has "omp declare target" or
5654 "omp declare target link" attribute, and cgraph or varpool node already
5655 exists, then set corresponding flags. Call c_finish_omp_clauses
5656 in the parenthesized extended-list syntax case.
5657 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5658 declare target.
5659 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5660 on OMP_CLAUSE_REDUCTION array sections.
5661 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5662 into the constant offset, or for variable low-bound using
5663 POINTER_PLUS_EXPR. For structure element based array sections use
5664 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5665 (c_finish_omp_clauses): Drop generic_field_head, structure
5666 elements are now always mapped even as array section bases,
5667 diagnose same var in data sharing and mapping clauses. Diagnose if
5668 linear step on declare simd is neither a constant nor a uniform
5669 parameter. Look through POINTER_PLUS_EXPR for array section
5670 reductions. Diagnose the same var or function appearing multiple
5671 times on the same directive. Fix up wording for the to clause if t
5672 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5673 modifier on kinds other than dynamic or guided or nonmonotonic
5674 modifier together with ordered clause.
5675
4bf9e5a8
TS
56762015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5677 Chung-Lin Tang <cltang@codesourcery.com>
5678
5679 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5680
2adfab87
AM
56812015-10-29 Andrew MacLeod <amacleod@redhat.com>
5682
5683 * c-array-notation.c: Reorder #include's and remove duplicates.
5684 * c-aux-info.c: Likewise.
5685 * c-convert.c: Likewise.
5686 * c-decl.c: Likewise.
5687 * c-errors.c: Likewise.
5688 * c-lang.c: Likewise.
5689 * c-objc-common.c: Likewise.
5690 * c-parser.c: Likewise.
5691 * c-typeck.c: Likewise.
5692
e922069e
JW
56932015-10-26 Jim Wilson <jim.wilson@linaro.org>
5694
5695 PR debug/66068
5696 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5697 after calling build_qualified_type.
5698
765dd391
CP
56992015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5700 Thomas Schwinge <thomas@codesourcery.com>
5701 James Norris <jnorris@codesourcery.com>
5702 Joseph Myers <joseph@codesourcery.com>
5703 Julian Brown <julian@codesourcery.com>
5704 Bernd Schmidt <bschmidt@redhat.com>
5705
5706 * c-parser.c (c_parser_oacc_shape_clause): New.
5707 (c_parser_oacc_simple_clause): New.
5708 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5709 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5710
88bae6f4
TS
57112015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5712 James Norris <jnorris@codesourcery.com>
5713 Cesar Philippidis <cesar@codesourcery.com>
5714
5715 PR c/64765
5716 PR c/64880
5717 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5718 parameters, and handle these. Adjust all users.
5719 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5720 into...
5721 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5722 all users.
5723 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5724 declare functions.
5725 (c_finish_omp_construct): Declare function.
5726 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5727 Merge functions into...
5728 (c_finish_omp_construct): ... this new function.
5729
a8fc2579
RB
57302015-10-22 Richard Biener <rguenther@suse.de>
5731
5732 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5733 before folding a MINUS_EXPR.
5734
e9122ef6
MP
57352015-10-21 Marek Polacek <polacek@redhat.com>
5736
5737 PR c/68024
5738 * c-decl.c (start_function): Warn about vararg functions without
5739 a prototype.
5740
9f47c7e5
IE
57412015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5742
5743 * c-typeck.c (build_conditional_expr): Use boolean vector
5744 type for vector comparison.
5745 (build_vec_cmp): New.
5746 (build_binary_op): Use build_vec_cmp for comparison.
5747
fa60eeb9
MP
57482015-10-20 Marek Polacek <polacek@redhat.com>
5749
5750 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5751
2c7020eb
MP
57522015-10-20 Marek Polacek <polacek@redhat.com>
5753
5754 PR c/67964
5755 * c-parser.c (c_parser_attributes): Break out of the loop if the
5756 token after an attribute isn't a comma.
5757
d9a6bd32
JJ
57582015-10-13 Jakub Jelinek <jakub@redhat.com>
5759 Aldy Hernandez <aldyh@redhat.com>
5760
5761 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5762 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5763 (c_parser_omp_variable_list): Handle structure elements for
5764 map, to and from clauses. Handle array sections in reduction
5765 clause. Formatting fixes.
5766 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5767 if clause modifiers.
5768 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5769 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5770 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5771 c_parser_omp_clause_is_device_ptr): New functions.
5772 (c_parser_omp_clause_ordered): Parse optional parameter.
5773 (c_parser_omp_clause_reduction): Handle array reductions.
5774 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5775 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5776 functions.
5777 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5778 (c_parser_omp_clause_depend_sink): New function.
5779 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5780 (c_parser_omp_clause_map): Parse release/delete map kinds and
5781 optional always modifier.
5782 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5783 and c_finish_omp_clauses callers.
5784 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5785 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5786 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5787 (OMP_CRITICAL_CLAUSE_MASK): Define.
5788 (c_parser_omp_critical): Parse critical clauses.
5789 (c_parser_omp_for_loop): Handle doacross loops, adjust
5790 c_finish_omp_for and c_finish_omp_clauses callers.
5791 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5792 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5793 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5794 (c_parser_omp_for): Disallow ordered clause when combined with
5795 distribute. Disallow linear clause when combined with distribute
5796 and not combined with simd.
5797 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5798 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5799 parse clauses and if depend clause is found, don't parse a body.
5800 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5801 Allow target parallel without for after it.
5802 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5803 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5804 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5805 invalid kinds.
5806 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5807 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5808 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5809 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5810 functions.
5811 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5812 defaultmap and is_device_ptr clauses.
5813 (c_parser_omp_target): Parse target parallel and target simd. Set
5814 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5815 and target exit data. Diagnose invalid map kinds.
5816 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5817 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5818 construct.
5819 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5820 &omp_priv.
5821 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5822 (c_parser_omp_taskloop): New function.
5823 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5824 handle PRAGMA_OMP_TASKLOOP.
5825 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5826 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5827 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5828 Add IS_OMP argument, handle structure element bases, diagnose
5829 bitfields, pass IS_OMP recursively, diagnose known zero length
5830 array sections in depend clauses, handle array sections in reduction
5831 clause, diagnose negative length even for pointers.
5832 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5833 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5834 array sections in reduction clause, set
5835 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5836 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5837 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5838 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5839
21ba0cea
MP
58402015-10-06 Marek Polacek <polacek@redhat.com>
5841
5842 * c-parser.c (c_parser_statement_after_labels): Use
5843 protected_set_expr_location.
5844 (c_parser_omp_clause_num_gangs): Likewise.
5845 (c_parser_omp_clause_num_threads): Likewise.
5846 (c_parser_omp_clause_num_workers): Likewise.
5847 (c_parser_omp_clause_vector_length): Likewise.
5848 (c_parser_omp_clause_num_teams): Likewise.
5849 (c_parser_omp_clause_thread_limit): Likewise.
5850 * c-typeck.c (build_c_cast): Likewise.
5851 (c_cast_expr): Likewise.
5852
624d31fe
RS
58532015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5854
5855 * c-typeck.c (c_tree_equal): Use real_equal instead of
5856 REAL_VALUES_EQUAL.
5857
b8fd7909
JM
58582015-10-04 Jason Merrill <jason@redhat.com>
5859
5860 * c-parser.c (c_lex_one_token): Handle @synchronized.
5861 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5862 can change whether the function is transaction_safe.
5863
1c7485af
MP
58642015-10-02 Marek Polacek <polacek@redhat.com>
5865
5866 PR c/67730
5867 * c-typeck.c (convert_for_assignment): Use the expansion point
5868 location throughout.
5869
3e3b8d63
MP
58702015-10-02 Marek Polacek <polacek@redhat.com>
5871
5872 PR c/64249
5873 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5874 and pass it down to c_parser_if_statement.
5875 (c_parser_else_body): Add CHAIN parameter and pass it down to
5876 c_parser_statement_after_labels.
5877 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5878 duplicated if-else-if conditions.
5879
aabef2de
MP
58802015-10-01 Marek Polacek <polacek@redhat.com>
5881
5882 * c-typeck.c (convert_for_assignment): Improve commentary.
5883
de8ddd5f
MP
58842015-09-30 Marek Polacek <polacek@redhat.com>
5885
5886 PR c/67730
5887 * c-typeck.c (c_finish_return): Use the expansion point location for
5888 certain "return with value" warnings.
5889
c4914de6
MLI
58902015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5891
5892 * c-parser.c (pragma_lex): Add loc argument.
5893
0e36f5c7
MP
58942015-09-15 Marek Polacek <polacek@redhat.com>
5895
5896 PR c/67580
5897 * c-decl.c (tag_exists_p): New function.
5898 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5899 struct/union/enum keywords are missing.
5900 * c-tree.h (tag_exists_p): Declare.
5901
2f3bb934
MP
59022015-09-15 Marek Polacek <polacek@redhat.com>
5903
5904 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5905 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5906 Return NULL_TREE instead of 0.
5907 (lookup_name): Return NULL_TREE instead of 0.
5908 (lookup_name_in_scope): Likewise.
5909 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5910 (parser_xref_tag): Use false instead of 0.
5911 (start_struct): Use true instead of 1.
5912 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5913
aa256c4a
MP
59142015-09-14 Marek Polacek <polacek@redhat.com>
5915
5916 * c-typeck.c (set_nonincremental_init_from_string): Use
5917 HOST_WIDE_INT_M1U when shifting a negative value.
5918
dbb68221
MW
59192015-09-09 Mark Wielaard <mjw@redhat.com>
5920
5921 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5922 parm against NULL.
5923
a8a098ac
JJ
59242015-09-10 Jakub Jelinek <jakub@redhat.com>
5925
5926 PR c/67502
5927 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5928 into OMP_FOR_PRE_BODY rather than before the loop.
5929
f4b189d5
JJ
59302015-09-09 Jakub Jelinek <jakub@redhat.com>
5931
0bb99c11
JJ
5932 PR c/67501
5933 * c-parser.c (c_parser_oacc_all_clauses,
5934 c_parser_omp_all_clauses): Remove invalid clause from
5935 list of clauses even if parser->error is set.
5936
fce5e5e3
JJ
5937 PR c/67500
5938 * c-parser.c (c_parser_omp_clause_aligned,
5939 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5940 test for errors.
5941 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5942 error_mark_node.
5943
f4b189d5
JJ
5944 PR c/67495
5945 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5946 instead of c_parser_unary_expression. If the result is !lvalue_p,
5947 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5948
b2aaf235
MP
59492015-09-04 Marek Polacek <polacek@redhat.com>
5950
5951 PR sanitizer/67279
5952 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5953
1807ffc1
MS
59542015-09-03 Martin Sebor <msebor@redhat.com>
5955
5956 PR c/66516
8b652e65
JJ
5957 * c-typeck.c (convert_arguments, parser_build_unary_op,
5958 build_conditional_expr, c_cast_expr, convert_for_assignment,
5959 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5960 reject_gcc_builtin.
5961 (c_decl_implicit): Define.
5962
d04ff417
MP
59632015-09-02 Marek Polacek <polacek@redhat.com>
5964
5965 PR c/67432
5966 * c-parser.c (c_parser_enum_specifier): Give a better error for
5967 an empty enum.
5968
a79683d5
TS
59692015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5970
5971 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5972
191a6b94
MP
59732015-08-12 Marek Polacek <polacek@redhat.com>
5974
5975 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5976 LOC to it.
5977
420a9d9b
MP
59782015-08-03 Marek Polacek <polacek@redhat.com>
5979
5980 PR c/67088
5981 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5982 Use it.
5983 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5984
992118a1
PP
59852015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5986
5987 * c-parser.c (c_parser_if_body): Take token_indent_info
5988 argument. Call warn_for_misleading_indentation even when the
5989 body is a semicolon. Extract token_indent_infos corresponding
5990 to the guard, body and next tokens. Adjust call to
5991 warn_for_misleading_indentation accordingly.
5992 (c_parser_else_body): Likewise.
5993 (c_parser_if_statement): Likewise.
5994 (c_parser_while_statement): Likewise.
5995 (c_parser_for_statement): Likewise.
5996
46308474
LFSM
59972015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5998 Manuel López-Ibáñez <manu@gcc.gnu.org>
5999
6000 * c-decl.c (get_parm_info): Remove static var. Update warning
6001 message.
6002
05b28fd6
MP
60032015-07-27 Marek Polacek <polacek@redhat.com>
6004
6005 PR c++/66555
6006 PR c/54979
6007 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6008
451b5e48
MP
60092015-07-20 Marek Polacek <polacek@redhat.com>
6010
6011 PR c++/55095
6012 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6013 (build_binary_op): Warn about left shift overflows.
6014
1916bcb5
AM
60152015-07-09 Andrew MacLeod <amacleod@redhat.com>
6016
6017 * c-array-notation.c: Adjust includes for flags.h changes.
6018 * c-objc-common.c: Likewise.
6019
c7131fb2
AM
60202015-07-07 Andrew MacLeod <amacleod@redhat.com>
6021
6022 * c-array-notation.c: Adjust includes.
6023 * c-aux-info.c: Likewise.
6024 * c-convert.c: Likewise.
6025 * c-decl.c: Likewise.
6026 * c-errors.c: Likewise.
6027 * c-lang.c: Likewise.
6028 * c-objc-common.c: Likewise.
6029 * c-parser.c: Likewise.
6030 * c-typeck.c: Likewise.
6031
da2e71c9
MLI
60322015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6033
6034 PR fortran/66605
6035 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6036
b155cfd9
MP
60372015-06-29 Marek Polacek <polacek@redhat.com>
6038
6039 PR c/66322
6040 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6041 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6042 about -Wswitch-bool here.
6043 (do_case): Update c_add_case_label call.
6044 (c_finish_case): Update c_do_switch_warnings call.
6045
31521951
MP
60462015-06-27 Marek Polacek <polacek@redhat.com>
6047
6048 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6049
22d03525
MP
60502015-06-26 Marek Polacek <polacek@redhat.com>
6051
6052 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6053 INDIRECT_REF_P.
6054 * c-typeck.c (array_to_pointer_conversion): Likewise.
6055 (build_unary_op): Likewise.
6056 (c_finish_return): Likewise.
6057
f0889939
AM
60582015-06-25 Andrew MacLeod <amacleod@redhat.com>
6059
6060 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6061 * c-parser.c: Likewise.
6062
8d67ee55
RS
60632015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6064
6065 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6066 instead of pointer_hash.
6067 (detect_field_duplicates): Likewise.
6068
0ae9bd27
MP
60692015-06-25 Marek Polacek <polacek@redhat.com>
6070
6071 * c-array-notation.c: Use VAR_P throughout.
6072 * c-decl.c: Likewise.
6073 * c-objc-common.c: Likewise.
6074 * c-parser.c: Likewise.
6075 * c-typeck.c: Likewise.
6076
62f9079a
MP
60772015-06-25 Marek Polacek <polacek@redhat.com>
6078
6079 * c-decl.c: Use is_global_var throughout.
6080 * c-parser.c: Likewise.
6081 * c-typeck.c: Likewise.
6082
abb226c9
AM
60832015-06-17 Andrew MacLeod <amacleod@redhat.com>
6084
6085 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6086 * c-aux-info.c: Likewise.
6087 * c-convert.c: Likewise.
6088 * c-decl.c: Likewise.
6089 * c-errors.c: Likewise.
6090 * c-lang.c: Likewise.
6091 * c-objc-common.c: Likewise.
6092 * c-parser.c: Likewise.
6093 * c-typeck.c: Likewise.
6094
8cbababc
JH
60952015-06-11 Jan Hubicka <hubicka@ucw.cz>
6096
6097 PR middle-end/66325
6098 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6099 variants.
6100
a0349665
PMR
61012015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6102
6103 * c-decl.c (pop_scope): Register the main translation unit
6104 through the new debug hook.
6105
13fdf2e2
AM
61062015-06-08 Andrew MacLeod <amacleod@redhat.com>
6107
6108 * c-array-notation.c : Adjust include files.
6109 * c-aux-info.c : Likewise.
6110 * c-convert.c : Likewise.
6111 * c-decl.c : Likewise.
6112 * c-errors.c : Likewise.
6113 * c-lang.c : Likewise.
6114 * c-lang.h : Likewise.
6115 * c-objc-common.c : Likewise.
6116 * c-parser.c : Likewise.
6117 * c-typeck.c : Likewise.
6118
d7438551
AH
61192015-06-05 Aldy Hernandez <aldyh@redhat.com>
6120
6121 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6122 immediately clobber it.
6123 (c_write_global_declarations_1): Remove call to
6124 check_global_declaration_1.
6125 (c_write_global_declarations_2): Remove.
6126 (c_write_final_cleanups): Rename from c_write_global_declarations.
6127 Remove call to finalize_compilation_unit.
6128 Remove calls to debugging hooks.
6129 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6130 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6131 * c-tree.h: Remove c_write_global_declarations.
6132
ecb9f223
AM
61332015-06-04 Andrew MacLeod <amacleod@redhat.com>
6134
6135 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6136 * c-aux-info.c: Likewise.
6137 * c-convert.c: Likewise.
6138 * c-decl.c: Likewise.
6139 * c-errors.c: Likewise.
6140 * c-lang.c: Likewise.
6141 * c-objc-common.c: Likewise.
6142 * c-parser.c: Likewise.
6143 * c-typeck.c: Likewise.
6144
9482b620
MP
61452015-06-04 Marek Polacek <polacek@redhat.com>
6146
6147 PR c/66341
6148 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6149 it is a lvalue.
6150
bc51ace3
PK
61512015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6152
6153 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6154 Warn for empty struct.
6155 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6156
ea5b45b6
AT
61572015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6158
6159 * c-decl.c (start_function): Call plugin before parsing.
6160 (finish_function): Call plugin after parsing.
6161
c2d47482
PK
61622015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6163
6164 PR c/49551
6165 * c-decl.c (merge_decls): Merge DECL_COMMON.
6166
a95492ab
JW
61672015-05-22 Jim Wilson <jim.wilson@linaro.org>
6168
6169 * Make-lang.in (check_gcc_pallelize): Define.
6170
fd5c817a
MP
61712015-05-22 Marek Polacek <polacek@redhat.com>
6172
6173 PR c/47043
6174 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6175 attributes.
6176
c7b70a3c
MP
61772015-05-21 Marek Polacek <polacek@redhat.com>
6178
6179 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6180 DECL_BUILT_IN.
6181
21b634ae
MP
61822015-05-20 Marek Polacek <polacek@redhat.com>
6183
6184 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6185 * c-typeck.c: Likewise.
6186
296a8c2f
MP
61872015-05-19 Marek Polacek <polacek@redhat.com>
6188
6189 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6190
41b37d5e
JJ
61912015-05-19 Jakub Jelinek <jakub@redhat.com>
6192
6193 PR middle-end/66199
6194 * c-parser.c (c_parser_omp_for_loop): Don't add
6195 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6196 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6197 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6198 constructs.
6199
fab27f52
MM
62002015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6201
6202 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6203 swaps.
fab27f52 6204
40de31cf
MLI
62052015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6206
6207 PR fortran/44054
6208 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6209 accessor function.
6210
3aa3c9fc
MP
62112015-05-14 Marek Polacek <polacek@redhat.com>
6212
6213 PR c/66066
6214 PR c/66127
6215 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6216 rather than with 0.
6217
c3388e62
DM
62182015-05-12 David Malcolm <dmalcolm@redhat.com>
6219
6220 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6221 to add a call to warn_for_misleading_indentation.
6222 (c_parser_else_body): Likewise, adding param "else_loc".
6223 (c_parser_if_statement): Check for misleading indentation.
6224 (c_parser_while_statement): Likewise.
6225 (c_parser_for_statement): Likewise.
6226
755e528f
MP
62272015-05-08 Marek Polacek <polacek@redhat.com>
6228
6229 PR c/64918
6230 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6231 (output_init_element): Likewise.
6232
0173bd2a
MP
62332015-05-07 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/65179
6236 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6237 value.
6238
9babc352
MP
62392015-04-30 Marek Polacek <polacek@redhat.com>
6240
6241 * c-typeck.c (set_init_label): Call error_at instead of error and
6242 pass LOC to it.
6243
ac9f18db
MP
6244 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6245 the type of a decl.
6246
ec3fba51
MP
6247 * c-typeck.c (c_build_va_arg): Clarify the error message.
6248
b811915d
TS
62492015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6250
6251 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6252 OMP_STANDALONE_CLAUSES.
6253
f3075008
MP
62542015-04-28 Marek Polacek <polacek@redhat.com>
6255
6256 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6257
4e81b788
MP
62582015-04-28 Marek Polacek <polacek@redhat.com>
6259
6260 PR c/65901
6261 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6262
6c1db78e
MP
62632015-04-25 Marek Polacek <polacek@redhat.com>
6264
6265 PR c/52085
6266 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6267 attribute.
6268
5c4abbb8
MP
62692015-04-23 Marek Polacek <polacek@redhat.com>
6270
6271 PR c/65345
6272 * c-decl.c (set_labels_context_r): New function.
6273 (store_parm_decls): Call it via walk_tree_without_duplicates.
6274 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6275 instead of create_tmp_var. Build TARGET_EXPR instead of
6276 COMPOUND_EXPR.
6277 (build_atomic_assign): Use create_tmp_var_raw instead of
6278 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6279
06aca1d5
IV
62802015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6281
6282 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6283 (c_parser_omp_target_update): Add missed %> to error_at ().
6284
8fba1830
BRF
62852015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6286
6287 PR target/55143
6288 * c-decl.c (c_default_pointer_mode): Remove definition.
6289 * c-tree.h (c_default_pointer_mode): Remove declaration.
6290
62021f64
TB
62912015-03-27 Tobias Burnus <burnus@net-b.de>
6292
6293 PR c/65586
6294 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6295 error out.
6296 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6297 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6298 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6299
9b65e171
JJ
63002015-03-19 Jakub Jelinek <jakub@redhat.com>
6301
6302 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6303 attribute for DECL_EXTERNAL VAR_DECLs.
6304
17958621
JJ
63052015-03-11 Jakub Jelinek <jakub@redhat.com>
6306
6307 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6308 argument.
6309
7ccb1a11
JJ
63102015-03-10 Jakub Jelinek <jakub@redhat.com>
6311
6312 PR c/65120
6313 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6314 before preparing arguments to warn_logical_not_parentheses.
6315
01177669
JJ
63162015-03-09 Jakub Jelinek <jakub@redhat.com>
6317
6318 PR c/65120
6319 * c-typeck.c (parser_build_binary_op): Don't warn for
6320 !!x == y or !b == y where b is _Bool.
6321
802ac282
MP
63222015-03-09 Marek Polacek <polacek@redhat.com>
6323
6324 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6325 * c-decl.c (grokdeclarator): Likewise.
6326 * c-typeck.c (build_binary_op): Likewise.
6327
e5165b60
MP
63282015-02-27 Marek Polacek <polacek@redhat.com>
6329
6330 PR c/65228
6331 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6332
065d214c
MP
63332015-02-14 Marek Polacek <polacek@redhat.com>
6334
6335 PR c/64768
6336 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6337 declared through a typedef name.
6338
e5d9235b
MP
63392015-02-13 Marek Polacek <polacek@redhat.com>
6340
6341 PR c/65050
6342 * c-decl.c (grokdeclarator): Print also the type when giving
6343 the error message about array's incomplete element type.
6344
fa01ffcc
JJ
63452015-02-11 Jakub Jelinek <jakub@redhat.com>
6346
6347 PR c/64824
6348 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6349 check in the POP macro.
6350
c3e38a03
MP
63512015-02-09 Marek Polacek <polacek@redhat.com>
6352
6353 PR c/64856
6354 * c-typeck.c (process_init_element): Don't always wrap
6355 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6356 initializing a range of elements.
6357
4886ec8e
JJ
63582015-02-04 Jakub Jelinek <jakub@redhat.com>
6359
6360 PR c/64824
6361 PR c/64868
6362 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6363
c3e38a03 63642015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6365
6366 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6367 processing enum declaration.
6368
7b33f0c8
MP
63692015-01-29 Marek Polacek <polacek@redhat.com>
6370
6371 PR c/64709
6372 * c-typeck.c (pop_init_level): If constructor_elements has
6373 exactly one element with integer_zerop value, set constructor_zeroinit
6374 to 1. Remove braces around warning_init call.
6375
dea63e49
JJ
63762015-01-27 Jakub Jelinek <jakub@redhat.com>
6377
6378 PR c/64766
6379 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6380 of FUNCTION_DECLs with error_mark_node.
6381
d38f7dce
JJ
63822015-01-26 Jakub Jelinek <jakub@redhat.com>
6383
6384 PR c/64778
6385 * c-typeck.c (convert_arguments): Return -1 if there are
6386 error_args, even if we've diagnosed too many arguments.
6387
cbf5d0e7
RB
63882015-01-21 Richard Biener <rguenther@suse.de>
6389
6390 PR middle-end/64313
6391 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6392 for builtins the user declared correctly.
6393
41dbbb37
TS
63942015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6395 Bernd Schmidt <bernds@codesourcery.com>
6396 Cesar Philippidis <cesar@codesourcery.com>
6397 James Norris <jnorris@codesourcery.com>
6398 Jakub Jelinek <jakub@redhat.com>
6399 Ilmir Usmanov <i.usmanov@samsung.com>
6400
6401 * c-parser.c: Include "gomp-constants.h".
6402 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6403 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6404 Use OMP_CLAUSE_SET_MAP_KIND.
6405 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6406 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6407 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6408 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6409 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6410 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6411 "copyout", "create", "delete", "deviceptr", "gang", "host",
6412 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6413 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6414 "present_or_create", "pcreate", "seq", "self", "vector",
6415 "vector_length", "wait", "worker".
6416 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6417 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6418 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6419 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6420 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6421 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6422 (c_parser_oacc_data_clause_deviceptr)
6423 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6424 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6425 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6426 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6427 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6428 (c_parser_oacc_parallel, c_parser_oacc_update)
6429 (c_parser_oacc_wait): New functions.
6430 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6431 (c_finish_oacc_data): New prototypes.
6432 * c-typeck.c: Include "gomp-constants.h".
6433 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6434 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6435 OMP_CLAUSE_SET_MAP_KIND.
6436 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6437 (c_finish_oacc_data): New functions.
6438 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6439 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6440 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6441 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6442 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6443 GOMP_MAP_FORCE_DEVICEPTR.
6444
adfac8df
JJ
64452015-01-09 Michael Collison <michael.collison@linaro.org>
6446
6447 * c-array-notation.c: Include hash-set.h, machmode.h,
6448 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6449 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6450 * c-aux-info.c: Ditto.
6451 * c-convert.c: Ditto.
6452 * c-decl.c: Ditto.
6453 * c-errors.c: Ditto.
6454 * c-lang.c: Dittoxs.
6455 * c-objc-common.c: Ditto.
6456 * c-parser.c: Ditto.
6457 * c-typeck.c: Include hash-set.h, machmode.h,
6458 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6459 fold-const.h, wide-int.h, inchash.h, real.h and
6460 fixed-value.h due to flattening of tree.h.
6461
2cc901dc
MP
64622015-01-07 Marek Polacek <polacek@redhat.com>
6463
6464 PR c/64417
6465 * c-typeck.c (process_init_element): Disallow initialization of
6466 a flexible array member with a string constant if the structure
6467 is in an array.
6468
5624e564
JJ
64692015-01-05 Jakub Jelinek <jakub@redhat.com>
6470
e5341100
JJ
6471 PR sanitizer/64344
6472 * c-typeck.c (convert_for_assignment, c_finish_return): For
6473 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6474 types also set in_late_binary_op around convert call.
6475 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6476 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6477 result on expr as last argument to ubsan_instrument_float_cast,
6478 if in_late_binary_op, don't use c_save_expr but save_expr.
6479
5624e564
JJ
6480 Update copyright years.
6481
5bd012f8
MP
64822015-01-05 Marek Polacek <polacek@redhat.com>
6483
6484 PR c/64423
6485 * c-typeck.c (build_array_ref): Pass loc down to
6486 warn_array_subscript_with_type_char.
6487
3f8257db 64882014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6489
6490 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6491 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6492 element type.
8e745a17 6493 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6494 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6495 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6496 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6497 to PEDWARN_FOR_QUALIFIERS.
768952be 6498
8f94a8c4
JJ
64992014-12-17 Jakub Jelinek <jakub@redhat.com>
6500
6501 PR sanitizer/64289
6502 * c-convert.c: Include ubsan.h.
6503 (convert): For real -> integral casts and
6504 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6505 instead instrument the float cast directly.
6506
b731b390
JJ
65072014-11-29 Jakub Jelinek <jakub@redhat.com>
6508
6509 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6510 c_finish_stmt_expr): Remove NULL last argument from
6511 create_tmp_var_raw and create_tmp_var calls.
6512 * c-array-notation.c (fix_builtin_array_notation_fn,
6513 build_array_notation_expr, fix_conditional_array_notations_1,
6514 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6515
541e35a6
MP
65162014-11-28 Marek Polacek <polacek@redhat.com>
6517
6518 PR c/63862
6519 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6520 convert the right operand to integer type.
6521
b286be94
MP
65222014-11-25 Marek Polacek <polacek@redhat.com>
6523
6524 PR c/63877
6525 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6526 for inline functions.
6527
aa7da51a
JJ
65282014-11-21 Jakub Jelinek <jakub@redhat.com>
6529
6530 PR target/63764
6531 * c-typeck.c (build_array_ref): Adjust
6532 convert_vector_to_pointer_for_subscript caller. If it returns true,
6533 call non_lvalue_loc on the result.
6534
d876207f
RB
65352014-11-11 Richard Biener <rguenther@suse.de>
6536
6537 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6538 to true.
6539
e5e44252
AK
65402014-11-10 Andi Kleen <ak@linux.intel.com>
6541
6542 PR c/60804
6543 * c-parser.c (c_parser_statement_after_labels): Call
6544 check_no_cilk.
6545 (c_parser_if_statement): Dito.
6546 (c_parser_switch_statement): Dito.
6547 (c_parser_while_statement): Dito.
6548 (c_parser_do_statement): Dito.
6549 (c_parser_for_statement): Dito.
6550 * c-typeck.c (c_finish_loop): Dito.
6551
13c21655
PC
65522014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6553
6554 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6555 OPT_Wshift_count_overflow in the warnings.
6556
2d51fcef
MP
65572014-10-30 Marek Polacek <polacek@redhat.com>
6558
6559 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6560 print the stripped version as well, if they're not the same.
6561
ef4bddc2
RS
65622014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6563
6564 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6565 machine_mode.
6566
c582198b
AM
65672014-10-28 Andrew MacLeod <amacleod@redhat.com>
6568
6569 * c-decl.c: Adjust include files.
6570 * c-parser.c: Ditto.
6571
ddc8de03
PM
65722014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6573 Tom Tromey <tromey@redhat.com>
6574
6575 * c-tree.h (enum c_oracle_request): New.
6576 (c_binding_oracle_function): New typedef.
6577 (c_binding_oracle, c_pushtag, c_bind): Declare.
6578 * c-decl.c (c_binding_oracle): New global.
6579 (I_SYMBOL_CHECKED): New macro.
6580 (i_symbol_binding): New function.
6581 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6582 (I_TAG_CHECKED): New macro.
6583 (i_tag_binding): New function.
6584 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6585 (I_LABEL_CHECKED): New macro.
6586 (i_label_binding): New function.
6587 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6588 (c_print_identifier): Save and restore c_binding_oracle.
6589 (c_pushtag, c_bind): New functions.
6590
60393bbc
AM
65912014-10-27 Andrew MacLeod <amacleod@redhat.com>
6592
6593 * c-typeck.c: Adjust include files.
6594
d723bb7c
MLI
65952014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6596
6597 PR c++/53061
6598 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6599 initialization here...
6600 (c_initialize_diagnostics): ... but here. Set defaults after
6601 building pretty-printer.
6602
1bc5a451
MP
66032014-10-23 Marek Polacek <polacek@redhat.com>
6604
6605 PR c/63626
6606 * c-decl.c (pop_scope): Don't print warning in external_scope.
6607
4435bb92
MP
66082014-10-19 Marek Polacek <polacek@redhat.com>
6609
6610 PR c/63567
6611 * c-typeck.c (output_init_element): Allow initializing objects with
6612 static storage duration with compound literals even in C99 and add
6613 pedwarn for it.
6614
7278465e
MP
66152014-10-17 Marek Polacek <polacek@redhat.com>
6616
6617 PR c/63567
6618 * c-typeck.c (digest_init): Allow initializing objects with static
6619 storage duration with compound literals even in C99 and add pedwarn
6620 for it.
6621
d9b7be2e
MP
66222014-10-17 Marek Polacek <polacek@redhat.com>
6623
6624 PR c/63543
6625 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6626 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6627 error multiple times. Print the type.
6628
f406ae1f
MP
66292014-10-17 Marek Polacek <polacek@redhat.com>
6630
6631 PR c/63549
6632 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6633 type.
6634
92574c7c
MP
66352014-10-17 Marek Polacek <polacek@redhat.com>
6636
6637 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6638 (start_function): Use OPT_Wimplicit_int instead of 0.
6639 (store_parm_decls_oldstyle): Likewise.
6640
1bc4a978
MT
66412014-10-17 Alan Modra <amodra@gmail.com>
6642
6643 PR middle-end/61848
6644 * c-decl.c (merge_decls): Don't merge section name or tls model
6645 to newdecl symtab node, instead merge to olddecl. Override
6646 existing olddecl section name. Set tls_model for all thread-local
6647 vars, not just OMP thread-private ones. Remove incorrect comment.
6648
83685514
AM
66492014-10-16 Andrew MacLeod <amacleod@redhat.com>
6650
6651 * c-decl.c: Adjust include files.
6652
78a7c317
DD
66532014-10-14 DJ Delorie <dj@redhat.com>
6654
6655 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6656 (c_token_starts_typename): Check all __intN, not just __int128.
6657 (c_token_starts_declspecs): Likewise.
6658 (c_parser_declspecs): Likewise.
6659 (c_parser_attribute_any_word): Likewise.
6660 (c_parser_objc_selector): Likewise.
6661 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6662 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6663 is specified.
6664 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6665 __int128.
6666 (finish_declspecs): Likewise.
6667
74d98c1e
AB
66682014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6669
8e745a17 6670 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6671 the duplicate code.
8e745a17 6672 (c_parser_statement): Call the new function.
74d98c1e 6673
84937de2
MP
66742014-10-09 Marek Polacek <polacek@redhat.com>
6675
6676 PR c/63480
6677 * c-typeck.c (pop_init_level): Don't warn about initializing
6678 with { }.
6679
0382aaa0
MP
66802014-10-07 Marek Polacek <polacek@redhat.com>
6681
6682 PR c/59717
6683 * c-decl.c (header_for_builtin_fn): New function.
6684 (implicitly_declare): Suggest which header to include.
6685
7a0ca710
MP
66862014-10-07 Marek Polacek <polacek@redhat.com>
6687
6688 * c-convert.c (convert): Use error_operand_p.
6689 * c-typeck.c (require_complete_type): Likewise.
6690 (really_atomic_lvalue): Likewise.
6691 (digest_init): Likewise.
6692 (handle_omp_array_sections_1): Likewise.
6693
6bc8a126
MP
66942014-10-03 Marek Polacek <polacek@redhat.com>
6695
6696 PR c/63453
6697 * c-decl.c (pop_scope): Don't warn about "inline function declared
6698 but never defined" for functions marked with gnu_inline attribute.
6699
d90c0a59
JJ
67002014-09-25 Jakub Jelinek <jakub@redhat.com>
6701
6702 PR c++/63249
6703 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6704 on low_bound and length.
6705
083e891e
MP
67062014-09-24 Marek Polacek <polacek@redhat.com>
6707
6708 PR c/61405
6709 PR c/53874
6710 * c-parser.c: Don't define CPP_KEYWORD.
6711 (c_parser_switch_statement): Pass original type to c_finish_case.
6712 * c-tree.h (c_finish_case): Update declaration.
6713 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6714 conditionally to c_do_switch_warnings.
6715
8d95fe25
MP
67162014-09-03 Marek Polacek <polacek@redhat.com>
6717
6718 PR c/62024
6719 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6720 conversions.
6721
9a771876
JJ
67222014-09-02 Jakub Jelinek <jakub@redhat.com>
6723 Balaji V. Iyer <balaji.v.iyer@intel.com>
6724 Igor Zamyatin <igor.zamyatin@intel.com>
6725
6726 * c-parser.c (c_parser_cilk_for): New function.
6727 (c_parser_cilk_grainsize): Likewise.
6728 (c_get_temp_regvar): Likewise.
6729 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6730 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6731 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6732 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6733 case.
6734
b7679d96
CG
67352014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6736
6737 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6738 with using HOST_WIDE_INT without truncation to 'int'
6739
59ea0364
MP
67402014-08-22 Marek Polacek <polacek@redhat.com>
6741
6742 PR c++/62199
6743 * c-typeck.c (parser_build_binary_op): Adjust call to
6744 warn_logical_not_parentheses.
6745
671a475e
IZ
67462014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6747
6748 PR other/62008
6749 * c-parser.c (c_parser_array_notation): Check for correct
6750 type of an array added.
6751
04159acf
MP
67522014-08-19 Marek Polacek <polacek@redhat.com>
6753
6754 PR c++/62153
6755 * c-typeck.c (build_binary_op): If either operand of a comparison
6756 is a boolean expression, call maybe_warn_bool_compare.
6757
c77935ee
PP
67582014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6759
6760 PR c/45584
6761 * c-typeck.c (build_c_cast): Do a conversion even when the
6762 TYPE_MAIN_VARIANTs are the same.
6763
35aff4fb
MP
67642014-08-19 Marek Polacek <polacek@redhat.com>
6765
6766 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6767 pedwarn_c99 instead of pedwarn.
6768 (grokfield): Likewise.
6769 (warn_defaults_to): New function.
6770 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6771 Unconditionally call pedwarn_c99 instead of pedwarn.
6772 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6773 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6774 check flag_isoc11 before.
6775 * c-errors.c (pedwarn_c99): Change the return type to bool.
6776 Handle -Wc99-c11-compat.
6777 * c-parser.c (disable_extension_diagnostics): Handle
6778 warn_c99_c11_compat.
6779 (restore_extension_diagnostics): Likewise.
6780 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6781 instead of pedwarn, don't check flag_isoc11 before.
6782 (c_parser_declspecs): Likewise.
6783 (c_parser_alignas_specifier): Likewise.
6784 (c_parser_alignof_expression): Likewise.
6785 (c_parser_generic_selection): Likewise.
6786 * c-tree.h (pedwarn_c99): Update declaration.
6787 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6788 of pedwarn_c99.
6789
177cce46
MP
67902014-08-19 Marek Polacek <polacek@redhat.com>
6791
6792 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6793 to pedwarn_c90.
6794 * c-errors.c: Include "opts.h".
6795 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6796 * c-parser.c (disable_extension_diagnostics): Handle negative value
6797 of warn_c90_c99_compat, too.
6798 (restore_extension_diagnostics): Likewise.
6799 (c_parser_compound_statement_nostart): Pass
6800 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6801
6dc99c33
MP
68022014-08-12 Marek Polacek <polacek@redhat.com>
6803
6804 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6805 Add pedwarn.
6806 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6807 Likewise.
6808 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6809
3f8257db 68102014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6811
6812 PR c/51849
6813 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6814 Call pedwarn_c90 instead of pedwarn.
6815 (check_bitfield_type_and_width): Likewise.
6816 (declspecs_add_qual): Likewise.
6817 (declspecs_add_type): Likewise.
6818 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6819 Adjust to only call pedwarn_c90.
6820 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6821 pedwarn_c90 instead of pedwarn.
6822 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6823 * c-parser.c (disable_extension_diagnostics): Handle
6824 warn_c90_c99_compat.
6825 (restore_extension_diagnostics): Likewise.
6826 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6827 pedwarn_c90 instead of pedwarn.
6828 (c_parser_initelt): Likewise.
6829 (c_parser_postfix_expression): Likewise.
6830 (c_parser_postfix_expression_after_paren_type): Likewise.
6831 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6832 * c-tree.h: Fix formatting.
6833 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6834 pedwarn_c90 instead of pedwarn.
6835
9f25a338
TS
68362014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6837
6838 * c-typeck.c: Remove include of pointer-set.h.
6839
044331a8
MP
68402014-08-07 Marek Polacek <polacek@redhat.com>
6841
6842 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6843
b787e7a2
TS
68442014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6845
6846 * c-typeck.c: Use hash_map instead of pointer_map.
6847
6e2830c3
TS
68482014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6849
6850 * c-decl.c: Use hash_set instead of pointer_set.
6851
a7ee52fb
IZ
68522014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6853
6854 PR middle-end/61455
6855 * c-array-notation.c (expand_array_notations): Handling
6856 of DECL_EXPR added.
6857
b4dfdc11
MG
68582014-07-31 Marc Glisse <marc.glisse@inria.fr>
6859
6860 PR c++/60517
6861 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6862 a local variable.
6863
976d5a22
TT
68642014-07-30 Tom Tromey <tromey@redhat.com>
6865
6866 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6867 field.
6868 (really_start_incremental_init, push_init_level): Initialize
6869 designator_depth.
6870 (pop_init_level): Set global designator_depth.
6871 (process_init_element): Check for designated_init attribute.
6872
30281de2
MP
68732014-07-20 Marek Polacek <polacek@redhat.com>
6874
6875 PR c/61852
6876 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6877 (implicitly_declare): Pass location to implicit_decl_warning.
6878
b108f48f
JJ
68792014-07-14 Jakub Jelinek <jakub@redhat.com>
6880
6881 PR middle-end/61294
6882 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6883 If non-NULL, call c_parser_check_literal_zero.
6884 (c_parser_check_literal_zero): New function.
6885 (c_parser_postfix_expression_after_primary): Adjust
6886 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6887
773ec47f
MP
68882014-07-06 Marek Polacek <polacek@redhat.com>
6889
6890 PR c/6940
6891 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6892 * c-tree.h (C_ARRAY_PARAMETER): Define.
6893 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6894 function parameter.
6895
22e1cf1c 68962014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6897 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6898
6899 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6900 releasing symbol.
6901
52ec0ea3
MP
69022014-07-01 Marek Polacek <polacek@redhat.com>
6903
6904 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6905 instead of 0 to WARN_FOR_ASSIGNMENT.
6906
d5c3d343
MP
69072014-07-01 Marek Polacek <polacek@redhat.com>
6908
6909 PR c/58286
6910 * c-typeck.c (convert_for_assignment): Pass
6911 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6912
6a7253a4
MP
69132014-06-30 Marek Polacek <polacek@redhat.com>
6914
6915 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6916 has no_sanitize_undefined attribute.
6917
5e88a8f4
IZ
69182014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6919
6920 PR middle-end/57541
6921 * c-array-notation.c (fix_builtin_array_notation_fn):
6922 Check for 0 arguments in builtin call. Check that bultin argument is
6923 correct.
6924 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6925 index.
6926
9698b078
SH
69272014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6928
6929 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6930 qualifiers in __auto_type for atomic types.
6931 (c_parser_typeof_specifier): Discard all type qualifiers in
6932 __typeof__ for atomic types.
6933
6e07c515
MP
69342014-06-25 Marek Polacek <polacek@redhat.com>
6935
6936 PR c/61162
6937 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6938 the return expression to c_finish_return.
6939
da6f124d
JJ
69402014-06-25 Jakub Jelinek <jakub@redhat.com>
6941
6942 * c-typeck.c (c_finish_omp_clauses): Make sure
6943 OMP_CLAUSE_LINEAR_STEP has correct type.
6944
c203e8a7
TS
69452014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6946
6947 * c-decl.c: Adjust.
6948
56ad0e38
JJ
69492014-06-24 Jakub Jelinek <jakub@redhat.com>
6950
6951 * c-parser.c (c_parser_omp_for_loop): For
6952 #pragma omp parallel for simd move lastprivate clause from parallel
6953 to for rather than simd.
6954
47c2554f
MP
69552014-06-23 Marek Polacek <polacek@redhat.com>
6956
6957 * c-typeck.c (parser_build_binary_op): Don't call
6958 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6959
56363ffd
JH
69602014-06-15 Jan Hubicka <hubicka@ucw.cz>
6961
6962 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6963 * c-decl.c (merge_decls): Likewise.
6964
d7ff7ae5
MP
69652014-06-09 Marek Polacek <polacek@redhat.com>
6966
6967 PR c/36446
6968 * c-typeck.c (error_init): Call inform instead of error_at.
6969 (pedwarn_init): Call inform instead of pedwarn.
6970 (warning_init): Call inform instead of warning_at.
6971
24d047a3
JH
69722014-06-07 Jan Hubicka <hubicka@ucw.cz>
6973
6974 * c-decl.c (merge_decls): Use set_decl_section_name.
6975 (duplicate_decls): Remove node if it exists.
6976
9bac5cbb
G
69772014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6978
6979 PR c/53119
6980 * c-typeck.c (push_init_level, process_init_element,
6981 pop_init_level): Correct check for zero initialization, move
6982 missing brace warning to respect zero initialization.
6983
8ffcdea8
MP
69842014-06-05 Marek Polacek <polacek@redhat.com>
6985
6986 PR c/56724
6987 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6988
742938c9
MP
69892014-06-05 Marek Polacek <polacek@redhat.com>
6990
6991 PR c/49706
6992 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6993 on the left hand side operand of a comparison.
742938c9 6994
6447c55d
MP
69952014-06-05 Marek Polacek <polacek@redhat.com>
6996
6997 PR c/48062
6998 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6999 Print note only if the warning was printed.
7000
9dc7743c
IZ
70012014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7002
7003 PR c/58942
7004 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7005 with a pointer.
7006
fedfecef
MP
70072014-06-03 Marek Polacek <polacek@redhat.com>
7008
7009 PR c/60439
7010 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7011 c_start_case.
7012 * c-tree.h (c_start_case): Update.
7013 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7014 switch condition has boolean value.
7015
9b2b7279
AM
70162014-06-02 Andrew MacLeod <amacleod@redhat.com>
7017
7018 * c-decl.c: Include builtins.h.
7019 * c-parser.c: Likewise.
7020
5c1bc275
MP
70212014-05-27 Marek Polacek <polacek@redhat.com>
7022
7023 PR c/56724
7024 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7025 error and warning calls to error_at and warning_at. Pass location of
7026 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7027 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7028 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7029
97563bc8
IZ
70302014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7031
7032 PR c/61191
7033 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7034 function parameters.
7035
aede2c10
JH
70362014-05-23 Jan Hubicka <hubicka@ucw.cz>
7037
7038 * c-decl.c (merge_decls): Preserve symtab node pointers.
7039 (duplicate_decls): Free new decl.
7040
edbba2ce
TS
70412014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7042
f3316c6d
TS
7043 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7044 initialization.
7045
edbba2ce
TS
7046 * c-parser.c (c_parser_omp_target): Return bool values.
7047
68c81f24
TS
70482014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7049
7050 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7051 num_teams_loc variable to num_thread_limit_loc.
7052
632f2871
RS
70532014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7054
7055 * c-array-notation.c (expand_array_notations): Use void_node
7056 instead of void_zero_node.
7057
766090c2
TS
70582014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7059
7060 * c-decl.c (finish_struct): Adjust.
7061 (finish_enum): Likewise.
7062 (bind): Adjust.
7063 (record_inline_static): Likewise.
7064 (push_scope): Likewise.
7065 (make_label): Likewise.
7066 (lookup_label_for_goto): Likewise.
7067 (finish_struct): Likewise.
7068 (finish_enum): Likewise.
7069 (store_parm_decls): Likewise.
7070 (c_push_function_context): Likewise.
7071 * c-lang.h: Remove usage of variable_size gty attribute.
7072 * c-parser.c (c_parse_init): Adjust.
7073 (c_parse_file): Likewise.
7074
2b107f6b
MP
70752014-05-13 Marek Polacek <polacek@redhat.com>
7076
7077 PR c/61162
7078 * c-typeck.c (convert_for_assignment): Pass location to
7079 WARN_FOR_ASSIGNMENT instead of input_location.
7080
d033409e
MP
70812014-05-10 Marek Polacek <polacek@redhat.com>
7082
7083 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7084 maybe_warn_string_init.
7085 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7086 maybe_warn_string_init.
7087 * c-tree.h (maybe_warn_string_init): Update declaration.
7088 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7089 Call pedwarn_init with loc instead of with input_location.
7090 (digest_init): Pass init_loc to maybe_warn_string_init.
7091 (pop_init_level): Call pedwarn_init with loc instead of with
7092 input_location.
7093 (set_init_index): Likewise.
7094 (process_init_element): Likewise.
7095
ea58ef42
MP
70962014-05-09 Marek Polacek <polacek@redhat.com>
7097
7098 PR c/61096
7099 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7100 (c_parser_initelt): Pass location to set_init_label. Pass array index
7101 location to set_init_index.
7102 * c-tree.h (push_init_level): Update declaration.
7103 (pop_init_level): Likewise.
7104 (set_init_index): Likewise.
7105 (set_init_label): Likewise.
7106 * c-typeck.c (error_init): Add location parameter. Call error_at
7107 instead of error.
7108 (digest_init): Pass init_loc to error_init.
7109 (really_start_incremental_init):
7110 (push_init_level): Add location parameter. Pass loc to pop_init_level
7111 and error_init.
7112 (pop_init_level): Likewise.
7113 (set_designator): Add location parameter. Pass loc to pop_init_level,
7114 push_init_level, and error_init.
7115 (set_init_index): Add location parameter. Pass loc to error_init and
7116 set_designator.
7117 (set_init_label): Likewise.
7118 (output_init_element): Pass loc to error_init.
7119 (process_init_element): Pass loc to error_init, pop_init_level,
7120 pedwarn_init, and push_init_level.
7121
661a0813
MP
71222014-05-09 Marek Polacek <polacek@redhat.com>
7123
7124 PR c/50459
7125 * c-parser.c (c_parser_attributes): Parse the arguments as an
7126 expression-list if the attribute takes identifier.
7127
2793eeab
MP
71282014-05-08 Marek Polacek <polacek@redhat.com>
7129
7130 PR c/61053
7131 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7132 TYPE_ALIGN_UNIT.
7133
f827930a
MP
71342014-05-08 Marek Polacek <polacek@redhat.com>
7135
7136 PR c/61077
7137 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7138 of main.
7139
1d60af08
KZ
71402014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7141 Mike Stump <mikestump@comcast.net>
7142 Richard Sandiford <rdsandiford@googlemail.com>
7143
7144 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7145 (finish_enum): Use wide-int interfaces.
7146 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7147 * c-typeck.c (build_c_cast): Likewise.
7148 (set_nonincremental_init_from_string): Likewise.
7149 (c_tree_equal): Likewise.
7150
a0e24419
MP
71512014-05-02 Marek Polacek <polacek@redhat.com>
7152
7153 PR c/25801
7154 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7155 Return size_one_node when the type is not complete.
7156 (pointer_diff): Remove comment.
7157 (build_unary_op): Improve error messages.
7158
19fc9faa
MP
71592014-05-02 Marek Polacek <polacek@redhat.com>
7160
7161 * c-typeck.c (c_finish_return): Separate warning_at calls.
7162
63bc4e87
MP
71632014-05-02 Marek Polacek <polacek@redhat.com>
7164
7165 * c-tree.h (error_init): Remove declaration.
7166 (pedwarn_init): Likewise.
7167 * c-typeck.c (error_init): Make static and move above.
7168 (pedwarn_init): Likewise.
7169 (warning_init): Move above.
7170 (maybe_warn_string_init): Likewise.
7171
4bd2511b
JL
71722014-05-01 Jeff Law <law@redhat.com>
7173
7174 Revert:
7175
7176 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7177 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7178 avoid goto.
7179
6a358dcb
MP
71802014-05-02 Marek Polacek <polacek@redhat.com>
7181
7182 PR c/60784
7183 * c-typeck.c (push_init_level): Set constructor_designated to
7184 p->designated for structures.
7185
ae5ebda4
MP
71862014-05-01 Marek Polacek <polacek@redhat.com>
7187
7188 PR c/60915
7189 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7190 function-definition has an attribute after the declarator.
7191
96b40f8d
MP
71922014-05-01 Marek Polacek <polacek@redhat.com>
7193
7194 PR c/60257
7195 * c-typeck.c (warning_init): Add location_t parameter. Call
7196 warning_at instead of warning.
7197 (push_init_level): Pass input_location to warning_init.
7198 (add_pending_init): Add location_t parameter. Pass loc to
7199 warning_init.
7200 (set_nonincremental_init): Pass input_location to add_pending_init.
7201 (set_nonincremental_init_from_string): Likewise.
7202 (output_init_element): Pass loc to warning_init and to
7203 add_pending_init.
7204
32e00768
MP
72052014-05-01 Marek Polacek <polacek@redhat.com>
7206
7207 PR c/43395
7208 * c-typeck.c (c_finish_return): Distinguish between label and variable
7209 when warning about returning local address.
7210
c9379ce2
MP
72112014-05-01 Marek Polacek <polacek@redhat.com>
7212
7213 PR c/29467
7214 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7215 in C89 mode.
7216
d00887e8
MP
72172014-05-01 Marek Polacek <polacek@redhat.com>
7218
7219 PR c/43245
7220 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7221 instead of 0 to WARN_FOR_QUALIFIERS.
7222
5436fa2e
MP
72232014-05-01 Marek Polacek <polacek@redhat.com>
7224
7225 PR c/56989
7226 * c-typeck.c (default_conversion): Use better location for
7227 error call.
7228
f8ed5150
MP
72292014-04-30 Marek Polacek <polacek@redhat.com>
7230
7231 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7232 also when SANITIZE_FLOAT_DIVIDE is on.
7233
8337d1db
MP
72342014-04-30 Marek Polacek <polacek@redhat.com>
7235
7236 PR c/60139
7237 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7238 and pedwarn_init. Use loc insted of input_location.
7239
c4bdc42f
MP
72402014-04-30 Marek Polacek <polacek@redhat.com>
7241
7242 PR c/60351
7243 * c-typeck.c (build_binary_op): Use location when warning about
7244 shift count.
7245
45484dcf
MP
72462014-04-25 Marek Polacek <polacek@redhat.com>
7247
7248 PR c/18079
7249 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7250 always_inline/noinline and hot/cold attributes.
7251
34cf811f
MP
72522014-04-25 Marek Polacek <polacek@redhat.com>
7253
7254 PR c/60114
7255 * c-parser.c (c_parser_initelt): Pass input_location to
7256 process_init_element.
7257 (c_parser_initval): Pass loc to process_init_element.
7258 * c-tree.h (process_init_element): Adjust declaration.
7259 * c-typeck.c (push_init_level): Pass input_location to
7260 process_init_element.
7261 (pop_init_level): Likewise.
7262 (set_designator): Likewise.
7263 (output_init_element): Add location_t parameter. Pass loc to
7264 digest_init.
7265 (output_pending_init_elements): Pass input_location to
7266 output_init_element.
7267 (process_init_element): Add location_t parameter. Pass loc to
7268 output_init_element.
7269
42056eac
JJ
72702014-04-24 Jakub Jelinek <jakub@redhat.com>
7271
7272 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7273 atomic-clause, allow comma in between atomic-clause and
7274 seq_cst.
7275
e162a134
JJ
72762014-04-22 Jakub Jelinek <jakub@redhat.com>
7277
7278 PR c/59073
7279 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7280 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7281
2f6babac
IZ
72822014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7283
7284 PR middle-end/60469
7285 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7286 create_tmp_var instead build_decl for creating temps.
7287 (build_array_notation_expr): Likewise.
7288 (fix_conditional_array_notations_1): Likewise.
7289 (fix_array_notation_expr): Likewise.
7290 (fix_array_notation_call_expr): Likewise.
7291
8edbfaa6
JJ
72922014-03-28 Jakub Jelinek <jakub@redhat.com>
7293
7294 PR c++/60689
7295 * c-tree.h (c_build_function_call_vec): New prototype.
7296 * c-typeck.c (build_function_call_vec): Don't call
7297 resolve_overloaded_builtin here.
7298 (c_build_function_call_vec): New wrapper function around
7299 build_function_call_vec. Call resolve_overloaded_builtin here.
7300 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7301 Call c_build_function_call_vec instead of build_function_call_vec.
7302 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7303 * c-decl.c (finish_decl): Likewise.
7304
7485aeea
MLI
73052014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7306
7307 PR c/55383
7308 * c-typeck.c: Use correct format string in cast-qual warning
7309
b17a8b07
TS
73102014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7311
7312 * c-decl.c (c_decl_attributes): Use
7313 lang_hooks.types.omp_mappable_type.
7314 * c-typeck.c (c_finish_omp_clauses): Likewise.
7315
3af9c5e9
MP
73162014-03-06 Marek Polacek <polacek@redhat.com>
7317
7318 PR c/60197
7319 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7320 of checking tree code.
7321
1c9f5f33
PK
73222014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7323
7324 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7325 (c_parser_parameter_declaration): Likewise.
7326
cc28fc7f
MP
73272014-02-19 Marek Polacek <polacek@redhat.com>
7328
7329 PR c/60195
7330 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7331 Call mark_exp_read on exp.value.
7332 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7333 TREE_ADDRESSABLE on old instead of val.
7334 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7335
b581c05c
PK
73362014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7337
7338 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7339 C_EXPR_APPEND by vec_safe_push.
7340 * c-tree.h (C_EXPR_APPEND): Remove.
7341
81e5eca8
MP
73422014-01-31 Marek Polacek <polacek@redhat.com>
7343
7344 PR c/59963
7345 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7346 build_function_call_vec.
7347 (build_function_call): Likewise.
7348 (build_atomic_assign): Likewise.
7349 (build_function_call_vec): Add arg_loc parameter. Use it.
7350 (convert_arguments): Likewise.
7351 (convert_for_assignment): Rename rhs_loc to expr_loc.
7352 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7353 (c_parser_objc_keywordexpr): Likewise.
7354 (c_parser_postfix_expression_after_primary): Call
7355 build_function_call_vec with expr_loc rather than op_loc.
7356 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7357 build_function_call_vec.
7358 (c_parser_expr_list): Add locations parameter. Fill it with locations
7359 of function arguments.
7360 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7361
68fca595
MP
73622014-01-30 Marek Polacek <polacek@redhat.com>
7363
7364 PR c/59940
7365 * c-typeck.c (build_function_call_vec): Use loc parameter.
7366 (convert_arguments): Add location parameter. Use it.
7367 (ep_convert_and_check): Likewise.
7368 (build_atomic_assign): Adjust convert_for_assignment call.
7369 (build_modify_expr): Likewise.
7370 (digest_init): Likewise.
7371 (c_finish_return): Likewise.
7372 (build_conditional_expr): Adjust ep_convert_and_check calls.
7373 (convert_for_assignment): Add rhs_loc parameter. Use it.
7374 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7375 calls.
7376
fa337f3a
RB
73772014-01-30 Richard Biener <rguenther@suse.de>
7378
7379 PR c/59905
7380 * c-typeck.c (build_function_call_vec): Do not replace calls
7381 to a function via an incompatible type with a runtime abort.
7382
b72271b9
BI
73832014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7384
7385 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7386 flag_enable_cilkplus with flag_cilkplus.
7387 (c_parser_direct_declarator_inner): Likewise.
7388 (c_parser_attribute_any_word): Likewise.
7389 (c_parser_attributes): Likewise.
7390 (c_parser_compound_statement): Likewise.
7391 (c_parser_statement_after_labels): Likewise.
7392 (c_parser_if_statement): Likewise.
7393 (c_parser_switch_statement): Likewise.
7394 (c_parser_do_statement): Likewise.
7395 (c_parser_for_statement): Likewise.
7396 (c_parser_unary_expression): Likewise.
7397 (c_parser_postfix_expression): Likewise.
7398 (c_parser_postfix_expression_after_primary): Likewise.
7399 (c_parser_postfix_expression_after_primary): Likewise.
7400 (c_parser_omp_clause_name): Likewise.
7401 (c_finish_omp_declare_simd): Likewise.
7402 (c_parser_cilk_verify_simd): Likewise.
7403 * c-typeck.c (build_array_ref): Likewise.
7404 (build_function_call_vec): Likewise.
7405 (convert_arguments): Likewise.
7406 (build_compound_expr): Likewise.
7407 (c_finish_return): Likewise.
7408 (c_finish_if_stmt): Likewise.
7409 (c_finish_loop): Likewise.
7410 (build_binary_op): Likewise.
7411
393e8e8b
MP
74122014-01-23 Marek Polacek <polacek@redhat.com>
7413
7414 PR c/59846
7415 * c-typeck.c (parser_build_binary_op): Use location instead of
7416 input_location.
7417 (build_binary_op): Pass location to shorten_compare.
7418
f04dda30
MP
74192014-01-23 Marek Polacek <polacek@redhat.com>
7420
7421 PR c/58346
7422 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7423 an empty aggregate.
7424
789eadcd
MP
74252014-01-23 Marek Polacek <polacek@redhat.com>
7426
7427 PR c/59871
7428 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7429 of a comma expression.
7430 (emit_side_effect_warnings): Likewise.
7431
40f14e9f
BI
74322014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7433
7434 PR c/59825
7435 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7436 function to use walk_tree and moved a lot of its functionality to
7437 expand_array_notations.
7438 (expand_array_notations): New function.
7439
74558dd9
BI
74402014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7441
7442 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7443 attribute an attribute without value.
7444
652fea39
JJ
74452014-01-23 Jakub Jelinek <jakub@redhat.com>
7446
7447 PR middle-end/58809
7448 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7449 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7450
f34f1c87
MP
74512014-01-22 Marek Polacek <polacek@redhat.com>
7452
7453 PR c/59891
7454 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7455 of remove_c_maybe_const_expr on op1 and op2.
7456
241f845a
JJ
74572014-01-15 Jakub Jelinek <jakub@redhat.com>
7458
7459 PR c/58943
7460 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7461 effects, preevaluate rhs using SAVE_EXPR first.
7462
9a74f20c
BI
74632014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7464
7465 PR c++/59631
7466 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7467 statements with if-elseif statements.
7468
96066ce1
MP
74692014-01-06 Marek Polacek <polacek@redhat.com>
7470
7471 PR c/57773
7472 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7473 defined bit-field types only in ISO C.
7474
23a5b65a
RS
74752014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7476
7477 Update copyright years
7478
f9030485
RS
74792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7480
7481 * c-array-notation.c: Use the standard form for the copyright notice.
7482
41958c28
BI
74832013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7484
7485 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7486 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7487 field in parser is not empty. If not-empty, call the function
7488 c_parser_finish_omp_declare_simd.
7489 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7490 between SIMD-enabled functions and #pragma simd. Added new parameter.
7491 (c_parser_cilk_all_clauses): Modified the usage of the function
7492 c_parser_cilk_clause_vectorlength as mentioned above.
7493 (c_parser_cilk_simd_fn_vector_attrs): New function.
7494 (c_finish_cilk_simd_fn_tokens): Likewise.
7495 (is_cilkplus_vector_p): Likewise.
7496 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7497 "nomask," and "mask" strings in clause name.
7498 (c_parser_omp_all_clauses): Added 3 new case statements:
7499 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7500 PRAGMA_CILK_CLAUSE_NOMASK.
7501 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7502 check for vector attribute and if so call the function
7503 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7504 called the function c_finish_cilk_simd_fn_tokens.
7505 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7506 parser field is non-empty. If so, parse them as you would parse
7507 the omp declare simd pragma.
7508 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7509 Added a check when step is a parameter and flag it as error.
7510 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7511 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7512 pragma_omp_clause.
7513
cef0fd0e
TS
75142013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7515
7516 * c-parser.c (c_parser_omp_parallel): Fix description.
7517
12893402
BI
75182013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7519
7520 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7521 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7522 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7523 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7524
296674db
JM
75252013-12-04 Joseph Myers <joseph@codesourcery.com>
7526
7527 PR c/52023
7528 * c-parser.c (c_parser_alignas_specifier): Use
7529 c_sizeof_or_alignof_type instead of c_alignof.
7530 (c_parser_alignof_expression): Likewise, with min_alignof
7531 parameter depending on alignof spelling used.
7532
edd28054
MP
75332013-12-04 Marek Polacek <polacek@redhat.com>
7534
7535 PR c/54113
7536 * c-decl.c (start_function): Don't warn for missing prototype for
7537 inline functions.
7538
da0fc454
MP
75392013-12-03 Marek Polacek <polacek@redhat.com>
7540
7541 PR c/59351
7542 * c-decl.c (build_compound_literal): Allow compound literals with
7543 empty initial value.
7544
4c2ecab0
JM
75452013-12-02 Joseph Myers <joseph@codesourcery.com>
7546
7547 PR c/58235
7548 * c-typeck.c (build_modify_expr): Diagnose assignment to
7549 expression with array type.
7550
340baef7
JM
75512013-11-29 Joseph Myers <joseph@codesourcery.com>
7552
7553 PR c/42262
7554 * c-typeck.c (process_init_element): Do not treat a string as
7555 initializing a whole array when used with a designator for an
7556 individual element.
7557
6763b9f7
JM
75582013-11-29 Joseph Myers <joseph@codesourcery.com>
7559
7560 PR c/57574
7561 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7562 an inline function following a static declaration.
7563
e7bd1de1
JJ
75642013-11-28 Jakub Jelinek <jakub@redhat.com>
7565
7566 PR c/59310
7567 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7568 to p_name before calling c_parser_omp_teams instead of after.
7569 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7570 argument. Remove unused p_name variable.
7571
0136f8f0
AH
75722013-11-27 Aldy Hernandez <aldyh@redhat.com>
7573 Jakub Jelinek <jakub@redhat.com>
7574
7575 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7576 external_scope is NULL.
7577
241b71bb
TV
75782013-11-27 Tom de Vries <tom@codesourcery.com>
7579 Marc Glisse <marc.glisse@inria.fr>
7580
7581 PR c++/59032
7582 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7583
2fb9a547
AM
75842013-11-22 Andrew MacLeod <amacleod@redhat.com>
7585
7586 * c-typeck.c: Add required include files from gimple.h.
7587
8400e75e
DM
75882013-11-22 David Malcolm <dmalcolm@redhat.com>
7589
7590 * c-decl.c (define_label, shadow_tag_warned)
7591 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7592 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7593 (declspecs_add_type): Remove use of in_system_header macro.
7594 * c-parser.c (c_parser_unary_expression): Likewise.
7595 * c-typeck.c (store_init_value, process_init_element)
7596 (c_start_case): Likewise.
7597
7598 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7599 macro.
7600
7601 * c-parser.c (c_parser_set_source_position_from_token): Remove
7602 reference to in_system_header from comment.
7603
386b1f1f
RS
76042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7605
7606 * c-decl.c (grokdeclarator): Update comment to refer to
7607 tree_to_[su]hwi rather than tree_low_cst.
7608
ae7e9ddd
RS
76092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7610
7611 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7612 tree_to_uhwi throughout.
7613
9439e9a1
RS
76142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7615
7616 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7617 throughout.
7618
9541ffee
RS
76192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7620
7621 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7622 throughout.
7623
c02065fc
AH
76242013-11-15 Aldy Hernandez <aldyh@redhat.com>
7625
7626 * c-parser.c (c_parser_cilk_simd): New.
7627 (c_parser_cilk_verify_simd): New.
7628 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7629 (c_parser_omp_for_loop): Add case for NE_EXPR.
7630 Set c_break_label for CILK_SIMD.
7631 (c_parser_cilk_clause_vectorlength): New.
7632 (c_parser_cilk_clause_linear): New.
7633 (c_parser_cilk_clause_name): New.
7634 (c_parser_cilk_all_clauses): New.
7635 * c-typeck.c (build_unary_op): Pass location argument to
7636 readonly_error.
7637 (build_modify_expr): Same.
7638 (build_asm_expr): Same.
7639 (c_finish_bc_stmt): Error on break/continue in loops.
7640
18f429e2
AM
76412013-11-14 Andrew MacLeod <amacleod@redhat.com>
7642
7643 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7644
d8a2d370
DN
76452013-11-14 Diego Novillo <dnovillo@google.com>
7646
7647 * c-decl.c: Include print-tree.h.
7648 Include stor-layout.h.
7649 Include varasm.h.
7650 Include attribs.h.
7651 Include stringpool.h.
7652 * c-lang.c: Include fold-const.h.
7653 * c-parser.c: Include stringpool.h.
7654 Include attribs.h.
7655 Include stor-layout.h.
7656 Include varasm.h.
7657 Include trans-mem.h.
7658 * c-typeck.c: Include stor-layout.h.
7659 Include trans-mem.h.
7660 Include varasm.h.
7661 Include stmt.h.
7662
38b7bc7f
JM
76632013-11-13 Joseph Myers <joseph@codesourcery.com>
7664
7665 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7666 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7667 __auto_type.
7668 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7669 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7670 RID_AUTO_TYPE.
7671 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7672 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7673 (c_parser_declarator, c_parser_direct_declarator_inner)
7674 (c_parser_parameter_declaration, c_parser_type_name): All callers
7675 changed.
7676 (c_parser_declaration_or_fndef): Handle declarations with type
7677 determined from the initializer.
7678
45b0be94
AM
76792013-11-12 Andrew MacLeod <amacleod@redhat.com>
7680
18f429e2 7681 * c-typeck.c: Include gimplify.h.
45b0be94 7682
582d9b50
JM
76832013-11-12 Joseph Myers <joseph@codesourcery.com>
7684
7685 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7686 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7687 comment.
7688 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7689 or _Thread_local as appropriate in diagnostics.
7690 (build_null_declspecs): Initialize ret->thread_gnu_p.
7691 (declspecs_add_scspec): Handle either __thread or _Thread_local
7692 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7693 pedantic. Do not disallow _Thread_local extern and _Thread_local
7694 static.
7695
267bac10
JM
76962013-11-07 Joseph Myers <joseph@codesourcery.com>
7697 Andrew MacLeod <amacleod@redhat.com>
7698
7699 * c-aux-info.c (gen_type): Handle atomic qualifier.
7700 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7701 qualifiers when compating types.
7702 (shadow_tag_warned): Handle atomic_p in declspecs.
7703 (quals_from_declspecs): Likewise.
7704 (start_decl): Use c_type_promotes_to when promoting argument
7705 types.
7706 (grokdeclarator): Handle _Atomic.
7707 (get_parm_info): Diagnose any qualifier on "void" as only
7708 parameter.
7709 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7710 comparing types. Use c_type_promotes_to when promoting argument
7711 types.
7712 (finish_function): Use c_type_promotes_to when promoting argument
7713 types.
7714 (build_null_declspecs): Handle atomic_p in declspecs.
7715 (declspecs_add_qual): Handle RID_ATOMIC.
7716 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7717 (c_token_starts_declspecs): Handle RID_ATOMIC.
7718 (c_parser_declspecs): Handle atomic type specifiers and
7719 qualifiers.
7720 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7721 from types of expressions with atomic type.
7722 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7723 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7724 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7725 (c_parser_statement_after_labels, c_parser_switch_statement)
7726 (c_parser_for_statement, c_parser_expr_no_commas)
7727 (c_parser_conditional_expression, c_parser_binary_expression)
7728 (c_parser_cast_expression, c_parser_unary_expression)
7729 (c_parser_postfix_expression)
7730 (c_parser_postfix_expression_after_primary, c_parser_expression):
7731 Use convert_lvalue_to_rvalue.
7732 (c_parser_expression_conv, c_parser_expr_list): Document
7733 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7734 (c_parser_objc_synchronized_statement): Use
7735 convert_lvalue_to_rvalue.
7736 (c_parser_objc_selector): Handle RID_ATOMIC.
7737 (c_parser_objc_receiver, c_parser_array_notation): Use
7738 convert_lvalue_to_rvalue.
7739 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7740 _Atomic (type-name).
7741 (struct c_declspecs): Add atomic_p field.
7742 (convert_lvalue_to_rvalue): Declare.
7743 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7744 corresponding atomic types.
7745 (qualify_type): Don't add _Atomic qualifiers from second argument.
7746 (comp_target_types): Do not allow _Atomic mismatches.
7747 (type_lists_compatible_p): Do not remove atomic qualifiers when
7748 comparing types.
7749 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7750 (build_atomic_assign): New functions.
7751 (build_unary_op): Use build_atomic_assign for atomic increment and
7752 decrement.
7753 (build_conditional_expr): Do not treat _Atomic void as a qualified
7754 version of void.
7755 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7756 (find_anonymous_field_with_type, convert_to_anonymous_field)
7757 (convert_for_assignment): Do not remove atomic qualifiers when
7758 comparing types.
7759 (digest_init): Do not accept initialization of arrays of atomic
7760 elements by string constants.
7761 (build_asm_expr): Use convert_lvalue_to_rvalue.
7762 (build_binary_op): Do not treat _Atomic void as a qualified
7763 version of void.
7764
0c249d4b
DD
77652013-11-06 DJ Delorie <dj@redhat.com>
7766
7767 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7768 both explicit and builtin, print the location of the explicit one.
7769
6d7f7e0a
TB
77702013-11-05 Tobias Burnus <burnus@net-b.de>
7771
7772 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7773 c_parser_omp_distribute, c_parser_omp_teams,
7774 c_parser_omp_target, c_parser_omp_declare): Handle
7775 -fopenmp-simd.
7776
b906f4ca
MP
77772013-11-03 Marek Polacek <polacek@redhat.com>
7778
7779 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7780
ee1d5a02
JJ
77812013-11-01 Jakub Jelinek <jakub@redhat.com>
7782
7783 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7784 check_dup_generic at the end, unless remove is true.
7785 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7786 remove = true;.
7787 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7788
5a9785fb
JJ
77892013-10-31 Jakub Jelinek <jakub@redhat.com>
7790
7791 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7792 with decl that is not pointer nor array.
7793
939b37da
BI
77942013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7795
7796 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7797 a spawning function is found.
7798 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7799 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7800 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7801 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7802 case.
7803 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7804 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7805 expr.
7806 (c_finish_return): Added a check to reject _Cilk_spawn in return
7807 expression.
7808 (build_cilk_spawn): New function.
7809 (build_cilk_sync): Likewise.
7810 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7811
d4af74d4
TB
78122013-10-27 Tobias Burnus <burnus@net-b.de>
7813
7814 PR other/33426
7815 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7816 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7817 (c_parser_statement_after_labels): Update calls.
7818
d73749df 78192013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7820
7821 PR other/33426
7822 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7823 Handle PRAGMA_IVDEP.
7824 (c_parser_statement_after_labels): Update call.
7825
f28aa681
MP
78262013-10-24 Marek Polacek <polacek@redhat.com>
7827
7828 * c-parser.c (c_parser_struct_declaration): Add a comment.
7829 (c_parser_declarator): Don't allow _Alignas here.
7830
0645c1a2
AM
78312013-10-17 Andrew MacLeod <amacleod@redhat.com>
7832
7833 * c-parser.c: Include omp-low.h.
7834 * c-typeck.c: Likewise.
7835
568a31f2
MP
78362013-10-17 Marek Polacek <polacek@redhat.com>
7837
7838 PR c/58267
7839 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7840 Document syntax of the array-declarator.
7841 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7842 are not permitted.
7843 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7844 (c_parser_struct_declaration): Likewise.
7845 (c_parser_declarator): Likewise.
7846 (c_parser_direct_declarator_inner): Likewise.
7847 (c_parser_parameter_declaration): Likewise.
7848 (c_parser_type_name): Likewise.
7849
acf0174b
JJ
78502013-10-11 Jakub Jelinek <jakub@redhat.com>
7851
7852 * c-lang.h (current_omp_declare_target_attribute): New extern
7853 decl.
7854 * c-parser.c: Include c-lang.h.
7855 (struct c_parser): Change tokens to c_token *.
7856 Add tokens_buf field. Change tokens_avail type to unsigned int.
7857 (c_parser_consume_token): If parser->tokens isn't
7858 &parser->tokens_buf[0], increment parser->tokens.
7859 (c_parser_consume_pragma): Likewise.
7860 (enum pragma_context): Add pragma_struct and pragma_param.
7861 (c_parser_external_declaration): Adjust
7862 c_parser_declaration_or_fndef caller.
7863 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7864 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7865 Adjust recursive call.
7866 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7867 of pragma_external.
7868 (c_parser_parameter_declaration): Use pragma_param instead of
7869 pragma_external.
7870 (c_parser_compound_statement_nostart, c_parser_label,
7871 c_parser_for_statement): Adjust
7872 c_parser_declaration_or_fndef callers.
7873 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7874 it through to c_parser_conditional_expression.
7875 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7876 pass it through to c_parser_binary_expression. Adjust recursive
7877 call.
7878 (c_parser_binary_expression): Remove prec argument, add
7879 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7880 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7881 binop matches it, use build2 instead of parser_build_binary_op.
7882 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7883 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7884 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7885 Handle pragma_struct and pragma_param the same as pragma_external.
7886 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7887 (c_parser_omp_variable_list): Parse array sections for
7888 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7889 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7890 (c_parser_omp_clause_reduction): Handle user defined reductions.
7891 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7892 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7893 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7894 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7895 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7896 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7897 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7898 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7899 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7900 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7901 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7902 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7903 (c_parser_omp_for_loop): Add CODE argument, pass it through
7904 to c_finish_omp_for. Change last argument to cclauses,
7905 and adjust uses to grab parallel clauses from the array of all
7906 the split clauses. Adjust c_parser_binary_expression,
7907 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7908 (omp_split_clauses): New function.
7909 (c_parser_omp_simd): New function.
7910 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7911 Allow the function to be called also when parsing combined constructs,
7912 and call c_parser_omp_simd when parsing for simd.
7913 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7914 #pragma omp section, require exactly one structured-block instead of
7915 sequence of statements.
7916 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7917 Allow the function to be called also when parsing combined constructs.
7918 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7919 Allow the function to be called also when parsing combined
7920 constructs.
7921 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7922 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7923 c_parser_omp_teams, c_parser_omp_target_data,
7924 c_parser_omp_target_update, c_parser_omp_target,
7925 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7926 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7927 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7928 (c_parser_omp_construct): Add p_name and mask vars. Handle
7929 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7930 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7931 and c_parser_omp_sections callers.
7932 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7933 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7934 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7935 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7936 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7937 OMP_CLAUSE_DEPEND.
7938 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7939 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7940 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7941 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7942 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7943 * c-typeck.c: Include tree-inline.h.
7944 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7945 handle_omp_array_sections_1, handle_omp_array_sections,
7946 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7947 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7948 user defined reductions.
7949 (c_tree_equal): New function.
7950 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7951 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7952 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7953 c_check_omp_declare_reduction_r): New prototypes.
7954 * c-decl.c (current_omp_declare_target_attribute): New variable.
7955 (c_decl_attributes): New function.
7956 (start_decl, start_function): Use it instead of decl_attributes.
7957 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7958 c_omp_reduction_decl, c_omp_reduction_lookup,
7959 c_check_omp_declare_reduction_r): New functions.
7960
0a6c2227
TT
79612013-09-25 Tom Tromey <tromey@redhat.com>
7962
7963 * Make-lang.in (c/gccspec.o): Remove.
7964 (CFLAGS-c/gccspec.o): New variable.
7965 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7966 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7967 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7968
f3bc55f0
TT
79692013-09-25 Tom Tromey <tromey@redhat.com>
7970
7971 * Make-lang.in (c/gccspec.o): Don't use subshell.
7972
a24d975c
MP
79732013-09-18 Marek Polacek <polacek@redhat.com>
7974
7975 PR sanitize/58443
7976 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7977 Remove unnecessary check.
7978
ce6923c5
MP
79792013-09-18 Marek Polacek <polacek@redhat.com>
7980
7981 PR sanitizer/58411
7982 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7983 no_sanitize_undefined attribute.
7984
a1e51df9
KT
79852013-09-13 Kai Tietz <ktietz@redhat.com>
7986
7987 PR target/57848
7988 * c-decl.c (c_builtin_function_ext_scope): Remove
7989 wrong assumption that it is never called on prexisting
7990 symbol.
7991
0af94e6f
JR
79922013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7993
7994 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7995
20059c8b
GDR
79962013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7997
7998 * c-objc-common.c (c_tree_printer): Tidy.
7999
de5a5fa1
MP
80002013-08-30 Marek Polacek <polacek@redhat.com>
8001
8002 * c-typeck.c (build_binary_op): Add division by zero and shift
8003 instrumentation.
8004
2531a1d9 80052013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8006 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8007
6e2bcc98 8008 PR c/35649
2531a1d9
JR
8009 * c-typeck.c (c_common_type): Prefer double_type_node over
8010 other REAL_TYPE types with the same precision.
8011 (convert_arguments): Likewise.
8012
025311c4
GDR
80132013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8014
8015 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8016 (c_initialize_diagnostics): Call a destructor for the early printer.
8017
da6ca2b5
GDR
80182013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8019
8020 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8021 printer initialization.
8022
318cda85 80232013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8024
318cda85
BI
8025 PR c/57490
8026 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8027 check for truth values.
8028 (expand_array_notation_exprs): Added truth values case. Removed an
8029 unwanted else. Added for-loop to walk through subtrees in default
8030 case.
8031
b066401f
GDR
80322013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8033
8034 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8035
fb48aadc
JM
80362013-07-23 Joseph Myers <joseph@codesourcery.com>
8037
8038 * c-parser.c (struct c_generic_association): Fix typo.
8039
433cc7b0
TT
80402013-07-23 Tom Tromey <tromey@redhat.com>
8041 Joseph Myers <joseph@codesourcery.com>
8042
8043 * c-parser.c (struct c_generic_association): New.
8044 (c_generic_association_d): New typedef.
8045 (c_parser_generic_selection): New function.
8046 (c_parser_postfix_expression): Handle RID_GENERIC.
8047
26d40c3d
JM
80482013-07-13 Jason Merrill <jason@redhat.com>
8049
8050 PR c++/57793
8051 * c-decl.c (finish_struct): Check for too-large class.
8052
ecdbd01a 80532013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8054
8055 PR c/57821
8056 * c-typeck.c (set_init_index): When folding, check for index overflow.
8057
1141ed3f
BI
80582013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8059
8060 * c-parser.c (c_parser_array_notation): Removed rejection of array
8061 notations in an array of function pointers.
8062
713b46fa
BI
80632013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8064
8065 * c-array-notation.c (make_triplet_val_inv): New function.
8066 (create_cmp_incr): Likewise.
8067 (create_array_refs): Likewise.
8068 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8069 Also modularized common parts between functions and called the function.
8070 (build_array_notation_expr): Likewise.
8071 (fix_conditional_array_notations_1): Likewise.
8072 (fix_array_notation_expr): Likewise.
8073 (fix_array_notation_call_expr): Likewise.
8074
92f20202
MP
80752013-06-18 Marek Polacek <polacek@redhat.com>
8076
8077 PR c/57630
8078 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8079
73a23b06
BI
80802013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8081
8082 * c-array-notation.c (build_array_notation_expr): Reject array notation
8083 mismatch between LHS and RHS even inside a call_expr. Also, removed
8084 a couple while statements that were dead code.
8085
00b8517d
BI
80862013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8087
8088 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8089 excessive precision expressions in function parameters. Also removed
8090 couple unwanted while statements.
8091
1509bdda
BI
80922013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8093
8094 * c-array-notation.c (expand_array_notation_exprs): Added
8095 ARRAY_NOTATION_REF case.
ab20d992 8096
d60f1706
BI
80972013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8098
8099 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8100 function to c-family/array-notation-common.c.
8101 (is_cilkplus_reduce_builtin): Likewise.
8102 (find_rank): Likewise.
8103 (extract_array_notation_exprs): Likewise.
8104 (replace_array_notations): Likewise.
8105 (find_inv_trees): Likewise.
8106 (replace_inv_trees): Likewise.
8107 (contains_array_notation_expr): Likewise.
8108 (find_correct_array_notation_type): Likewise.
8109 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8110 (struct inv_list): Moved this to c-family/array-notation-common.c.
8111 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8112
6d6efbb3
BI
81132013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8114
8115 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8116 reduction functions outside the for-loop. Added a check if the fundecl
8117 is non-NULL. Finally, removed an unwanted if-statement, and made the
8118 body unconditional.
8119
25c22937
BI
81202013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8121
8122 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8123 condition of the if-statement matches the rank of else-block and then-
8124 block when array notations are used.
8125 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8126 expression after the entire function body is parsed.
8127 (c_parser_expr_no_commas): Delayed creating array notation expressions
8128 to the end of function parsing.
8129 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8130 whole if-statement instead of just the condition.
ab20d992 8131 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8132
edd25645
BI
81332013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8134
8135 PR c/57474
8136 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8137 array to NULL_TREE if they are unused. Also added a check for the
8138 field to be NULL before its fields are used in future.
ab20d992 8139
065ce7f1
RO
81402013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8141
8142 PR bootstrap/57450
8143 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8144 (build_array_notation_expr): Likewise.
8145
36536d79
BI
81462013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8147
8148 * c-typeck.c (build_array_ref): Added a check to see if array's
8149 index is greater than one. If true, then emit an error.
8150 (build_function_call_vec): Exclude error reporting and checking
8151 for builtin array-notation functions.
8152 (convert_arguments): Likewise.
8153 (c_finish_return): Added a check for array notations as a return
8154 expression. If true, then emit an error.
8155 (c_finish_loop): Added a check for array notations in a loop
8156 condition. If true then emit an error.
8157 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8158 (build_binary_op): Added a check for array notation expr inside
8159 op1 and op0. If present, we call another function to find correct
8160 type.
8161 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8162 * c-parser.c (c_parser_compound_statement): Check if array
8163 notation code is used in tree, if so, then transform them into
8164 appropriate C code.
8165 (c_parser_expr_no_commas): Check if array notation is used in LHS
8166 or RHS, if so, then build array notation expression instead of
8167 regular modify.
8168 (c_parser_postfix_expression_after_primary): Added a check for
8169 colon(s) after square braces, if so then handle it like an array
8170 notation. Also, break up array notations in unary op if found.
8171 (c_parser_direct_declarator_inner): Added a check for array
8172 notation.
8173 (c_parser_compound_statement): Added a check for array notation in
8174 a stmt. If one is present, then expand array notation expr.
8175 (c_parser_if_statement): Likewise.
8176 (c_parser_switch_statement): Added a check for array notations in
8177 a switch statement's condition. If true, then output an error.
8178 (c_parser_while_statement): Similarly, but for a while.
8179 (c_parser_do_statement): Similarly, but for a do-while.
8180 (c_parser_for_statement): Similarly, but for a for-loop.
8181 (c_parser_unary_expression): Check if array notation is used in a
8182 pre-increment or pre-decrement expression. If true, then expand
8183 them.
8184 (c_parser_array_notation): New function.
8185 * c-array-notation.c: New file.
8186 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8187
cd192ccc
MS
81882013-05-23 Mike Stump <mikestump@comcast.net>
8189
8190 * c-typeck.c (convert_for_assignment): Handle references to memory
8191 spaces better.
8192
427b248d
JM
81932013-05-16 Jason Merrill <jason@redhat.com>
8194
8195 * Make-lang.in (cc1$(exeext)): Use link mutex.
8196
44d90fe1
PC
81972013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8198
8199 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8200 to simply use OPT_Wpointer_arith.
8201 (build_unary_op): Likewise.
8202
4e7d7b3d
JJ
82032013-04-03 Jakub Jelinek <jakub@redhat.com>
8204
8205 PR c/19449
8206 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8207 argument. If set, or it temporarily for parsing of the first
8208 argument into force_folding_builtin_constant_p.
8209 (c_parser_postfix_expression): Adjust callers.
8210
839b422f
RB
82112013-03-21 Richard Biener <rguenther@suse.de>
8212
8213 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8214 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8215
2ee028f1
MP
82162013-02-12 Marek Polacek <polacek@redhat.com>
8217
8218 PR c/44938
8219 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8220 origtypes to NULL.
8221
8824edff
JJ
82222013-01-24 Jakub Jelinek <jakub@redhat.com>
8223
8224 PR c/56078
8225 * c-typeck.c (set_nonincremental_init_from_string): If
8226 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8227 returned false.
8228 (process_init_element): Likewise.
8229
eadd3d0d
JJ
82302012-12-20 Jakub Jelinek <jakub@redhat.com>
8231
8232 PR c++/55619
8233 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8234 argument, don't call default_function_array_conversion
8235 nor c_fully_fold here.
8236 (c_parser_asm_statement): Adjust callers.
8237 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8238 and outputs here, and call default_function_array_conversion
8239 on inputs that don't need to be addressable.
8240
f8a93a2e
JJ
82412012-12-18 Jakub Jelinek <jakub@redhat.com>
8242
8243 PR c/39464
8244 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8245 warning require that both c_common_unsigned_type as well as
8246 c_common_signed_type is the same for both mvl and mvr types.
8247
9771b263
DN
82482012-11-16 Diego Novillo <dnovillo@google.com>
8249
8250 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8251
8252 * c-common.c: Use new vec API in vec.h.
8253 * c-common.h: Likewise.
8254 * c-gimplify.c: Likewise.
8255 * c-pragma.c: Likewise.
8256 * c-pretty-print.c: Likewise.
8257 * c-pretty-print.h: Likewise.
8258 * c-semantics.c: Likewise.
8259 * c-decl.c: Likewise.
8260 * c-parser.c: Likewise.
8261 * c-tree.h: Likewise.
8262 * c-typeck.c: Likewise.
8263
880661a4
JW
82642012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8265
8266 PR c++/54930
8267 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8268
077d1abe
MLI
82692012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8270
8271 PR c/53066
8272 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8273 shadows a function, unless the variable is a function or a
8274 pointer-to-function.
8275
3a785c97
JJ
82762012-10-12 Jakub Jelinek <jakub@redhat.com>
8277
8278 PR c/54381
8279 * c-parser.c (struct c_tree_loc_pair): Removed.
8280 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8281 add location_t * and tree * arguments, fill in array of 3
8282 sizeof_arg trees and corresponding locs.
8283 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8284 c_parser_expr_list callers.
8285 (c_parser_postfix_expression_after_primary): Likewise. Pass
8286 array of 3 sizeof_arg trees and locs (corresponding to first
8287 3 arguments) to sizeof_pointer_memaccess_warning.
8288
703c8606
LC
82892012-10-09 Lawrence Crowl <crowl@google.com>
8290
8291 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8292 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8293 hash table.
8294
5d9de0d0
PC
82952012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8296
8297 PR c++/54194
8298 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8299 call.
8300
a212e43f
MG
83012012-10-09 Marc Glisse <marc.glisse@inria.fr>
8302
8303 PR c++/54427
8304 * c-typeck.c: Include c-common.h.
8305 (enum stv_conv): Moved to c-common.h.
8306 (scalar_to_vector): Moved to c-common.c.
8307 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8308 * Make-lang.in: c-typeck.c depends on c-common.h.
8309
3b78de56
AC
83102012-10-04 Arnaud Charlet <charlet@adacore.com>
8311
8312 * c-decl.c (c_write_global_declarations): Fix handling of
8313 -fdump-ada-spec*.
8314
78c60e3d
SS
83152012-09-30 Sharad Singhai <singhai@google.com>
8316
8317 * c-decl.c (c_write_global_declarations): Use a different method
8318 to determine if the dump has ben initialized.
8319
9f33203d
JM
83202012-09-14 Joseph Myers <joseph@codesourcery.com>
8321
8322 PR c/54552
8323 * c-typeck.c (c_cast_expr): When casting to a type requiring
8324 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8325 c_fully_fold first.
8326
a27d595d
JM
83272012-09-14 Joseph Myers <joseph@codesourcery.com>
8328
8329 PR c/54103
8330 * c-typeck.c (build_unary_op): Pass original argument of
8331 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8332 any C_MAYBE_CONST_EXPR, if it has integer operands.
8333 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8334 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8335 to c_objc_common_truthvalue_conversion, then remove any
8336 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8337 c_objc_common_truthvalue_conversion not
8338 c_common_truthvalue_conversion.
8339 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8340 call note_integer_operands for arguments with integer operands
8341 that are not integer constants.
8342
9feb29df
JJ
83432012-09-13 Jakub Jelinek <jakub@redhat.com>
8344
8345 PR c/54559
8346 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8347 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8348
d409320c
JJ
83492012-08-31 Jakub Jelinek <jakub@redhat.com>
8350
8351 PR c/54428
8352 * c-convert.c (convert): Don't call fold_convert_loc if
8353 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8354 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8355 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8356
6265d07c
JJ
83572012-08-24 Jakub Jelinek <jakub@redhat.com>
8358
8359 PR c/54355
8360 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8361 for nested and empty_ok arguments in the call to
8362 c_parser_declaration_or_fndef.
8363
1a4049e7
JJ
83642012-08-17 Jakub Jelinek <jakub@redhat.com>
8365
8366 * c-tree.h (c_last_sizeof_arg): Declare.
8367 * c-parser.c (struct c_tree_loc_pair): New type.
8368 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8369 non-NULL.
8370 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8371 (c_parser_postfix_expression_after_primary): Likewise. Call
8372 sizeof_pointer_memaccess_warning if needed.
8373 (sizeof_ptr_memacc_comptypes): New function.
8374 * c-typeck.c (c_last_sizeof_arg): New global variable.
8375 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8376
0229aee9
UB
83772012-07-24 Uros Bizjak <ubizjak@gmail.com>
8378
8379 * c-lang.h (lang_decl): Add variable_size GTY option.
8380
7ee2468b
SB
83812012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8382
8383 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8384 * Make-lang.in: Fix dependencies.
8385
d4a10d0a
SB
83862012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8387
8388 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8389 and add language Makefile hooks.
8390 * config-lang.in: New file.
8391 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8392 add the required "normal" config-lang.in rules.
8393 * c-lang.h: Moved from gcc/ to here.
8394 * c-tree.h: Likewise.
8395 * c-objc-common.c: Likewise.
8396 * c-objc-common.h: Likewise.
8397 * c-typeck.c: Likewise.
8398 * c-convert.c: Likewise.
8399 * c-lang.c: Likewise.
8400 * c-aux-info.c: Likewise.
8401 * c-errors.c: Likewise.
8402 * gccspec.c: Likewise.
8403 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8404 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8405\f
877e3c2a 8406Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8407
8408Copying and distribution of this file, with or without modification,
8409are permitted in any medium without royalty provided the copyright
8410notice and this notice are preserved.