]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
compiler: use correct init order for multi-value initialization
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
bc7e9f76
GA
12022-06-16 David Malcolm <dmalcolm@redhat.com>
2
3 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
4 group the warning with any note.
5 (warn_about_goto): Likewise to group error or warning with note.
6 Bail out if the warning wasn't emitted, to avoid emitting orphan
7 notes.
8 (lookup_label_for_goto): Add auto_diagnostic_group to
9 group the error with the note.
10 (check_earlier_gotos): Likewise.
11 (c_check_switch_jump_warnings): Likewise for any error/warning.
12 Conditionalize emission of the notes.
13 (diagnose_uninitialized_cst_member): Likewise for warning,
14 conditionalizing emission of the note.
15 (grokdeclarator): Add auto_diagnostic_group to group the "array
16 type has incomplete element type" error with any note.
17 (parser_xref_tag): Add auto_diagnostic_group to group warnings
18 with their notes. Conditionalize emission of notes.
19 (start_struct): Add auto_diagnostic_group to group the
20 "redefinition of" errors with any note.
21 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
22 (check_for_loop_decls): Likewise for pre-C99 error.
23
445ba599
GA
242022-06-07 Jakub Jelinek <jakub@redhat.com>
25
26 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
27 style linear clause modifiers. Set
28 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
29 old style modifiers are used.
30 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
31 with val modifier on simd or for if the old style modifiers are
32 used.
33
b168441c
GA
342022-06-02 David Malcolm <dmalcolm@redhat.com>
35
36 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
37 (c_get_sarif_source_language): New.
38 * c-tree.h (c_get_sarif_source_language): New decl.
39
820ead45
GA
402022-05-31 Jason Merrill <jason@redhat.com>
41
42 * Make-lang.in (c.tags): Look at *.cc.
43
442022-05-31 Jakub Jelinek <jakub@redhat.com>
45
46 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
47 clauses.
48
37b3b5da
GA
492022-05-28 Jakub Jelinek <jakub@redhat.com>
50
51 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
52 seen first, use "%<to%>" or "%<enter%>" depending on
53 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
54 "%<to%> or %<enter%>" wording.
55
d9176e64
GA
562022-05-27 Jakub Jelinek <jakub@redhat.com>
57
58 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
59 (c_parser_omp_all_clauses): For to clause on declare target, use
60 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
61 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
62 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
63 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
64 OMP_CLAUSE_TO_DECLARE.
65 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
66 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
67 name in diagnostics instead of
68 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
69
3dff965c
GA
702022-05-25 Jakub Jelinek <jakub@redhat.com>
71
72 PR c/91134
73 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
74 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
75 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
76 diagnostic and fixit hint if DATUM has pointer type.
77 * c-parser.cc (c_parser_postfix_expression,
78 c_parser_omp_variable_list): Adjust build_component_ref callers.
79 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
80 Likewise.
81
768f49a2
GA
822022-05-24 Jakub Jelinek <jakub@redhat.com>
83
84 PR c/105378
85 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
86
1cda629f
GA
872022-05-18 Marek Polacek <polacek@redhat.com>
88
89 PR c/105131
90 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
91 mismatches.
92 * c-tree.h (comptypes_check_enum_int): Declare.
93 * c-typeck.cc (comptypes): No longer static.
94
3d9439b1
GA
952022-05-17 Marek Polacek <polacek@redhat.com>
96
97 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
98 its value.
99
1002022-05-17 Jakub Jelinek <jakub@redhat.com>
101
102 * c-parser.cc (c_parser_omp_clause_depend): Parse
103 inoutset depend-kind.
104 (c_parser_omp_depobj): Likewise.
105
702bd11f
GA
1062022-05-16 Martin Liska <mliska@suse.cz>
107
108 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
109
49ace834
GA
1102022-05-12 Jakub Jelinek <jakub@redhat.com>
111
112 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
113 if flag_openmp.
114 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
115 in postfix expressions.
116 (c_parser_omp_variable_list): Handle omp_all_memory in depend
117 clause.
118 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
119 keyword in depend clause as null_pointer_node, diagnose invalid
120 uses.
121
bd022ff9
GA
1222022-05-09 Martin Liska <mliska@suse.cz>
123
124 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
125 macros.
126 (c_parser_binary_expression): Likewise.
127
a1947c92
GA
1282022-05-07 Marek Polacek <polacek@redhat.com>
129
130 PR c++/101833
131 PR c++/47634
132 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
133
405eda0d
GA
1342022-04-08 Jakub Jelinek <jakub@redhat.com>
135
136 PR c/105149
137 * c-typeck.cc (c_build_va_arg): Reject function types.
138
a2287813
GA
1392022-03-22 Marek Polacek <polacek@redhat.com>
140
141 PR c/82283
142 PR c/84685
143 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
144 (start_init): Set it.
145 (finish_init): Restore constructor_designated.
146 (push_init_level): Set constructor_designated to the value of
147 constructor_designated in the upper constructor_stack.
148
57eeedda
GA
1492022-03-12 Thomas Schwinge <thomas@codesourcery.com>
150
151 PR other/65095
152 * c-typeck.cc (handle_omp_array_sections_1)
153 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
154 instead of 'c_omp_map_clause_name'.
155
8cc4f9cd
GA
1562022-03-09 Joseph Myers <joseph@codesourcery.com>
157
158 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
159 differently from earlier standards for unprototyped function type
160 compatibility.
161
1622022-03-09 Jakub Jelinek <jakub@redhat.com>
163
164 PR c/104711
165 * c-fold.cc (c_fully_fold_internal): Don't emit
166 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
167 * c-typeck.cc (build_binary_op): Likewise.
168
e6533e2e
GA
1692022-03-07 Jakub Jelinek <jakub@redhat.com>
170
171 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
172 literal.
173
4bf3bac1
GA
1742022-02-23 Richard Biener <rguenther@suse.de>
175
176 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
177 SSA names without definition.
178 (c_parser_gimple_declaration): Handle pointer typed SSA names.
179
0bdb0498
GA
1802022-02-17 Jakub Jelinek <jakub@redhat.com>
181
182 PR c/104532
183 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
184 convert_lvalue_to_rvalue and build_indirect_ref instead of
185 build_simple_mem_ref.
186
e8d68f0a
GA
1872022-02-11 Richard Biener <rguenther@suse.de>
188
189 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
190 VEC_COND_EXPRs.
191
a645583d
GA
1922022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
193
194 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
195 clause.
196 (c_parser_omp_variable_list): Handle array sections.
197 (c_parser_omp_clause_has_device_addr): Added.
198 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
199 case.
200 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
201 OMP_CLAUSE_MASK.
202 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
203 (c_finish_omp_clauses): Handle array sections.
204
3adf509f
GA
2052022-02-09 Jakub Jelinek <jakub@redhat.com>
206
207 PR c/104427
208 * c-parser.cc (c_parser_postfix_expression)
209 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
210 instead of build1_loc to build PAREN_EXPR.
211 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
212 * c-fold.cc (c_fully_fold_internal): Likewise.
213
fc829782
GA
2142022-01-17 Martin Liska <mliska@suse.cz>
215
216 * Make-lang.in: Rename .c names to .cc.
217 * c-convert.cc: Likewise.
218 * c-decl.cc (struct lang_identifier): Likewise.
219 (pop_scope): Likewise.
220 (finish_decl): Likewise.
221 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
222 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
223 * c-parser.h (GCC_C_PARSER_H): Likewise.
224 * c-tree.h (c_keyword_starts_typename): Likewise.
225 (finish_declspecs): Likewise.
226 (c_get_alias_set): Likewise.
227 (enum c_oracle_request): Likewise.
228 (tag_exists_p): Likewise.
229 (set_c_expr_source_range): Likewise.
230 * c-typeck.cc (c_common_type): Likewise.
231 (c_finish_omp_clauses): Likewise.
232 * config-lang.in: Likewise.
233
2342022-01-17 Martin Liska <mliska@suse.cz>
235
236 * c-aux-info.c: Moved to...
237 * c-aux-info.cc: ...here.
238 * c-convert.c: Moved to...
239 * c-convert.cc: ...here.
240 * c-decl.c: Moved to...
241 * c-decl.cc: ...here.
242 * c-errors.c: Moved to...
243 * c-errors.cc: ...here.
244 * c-fold.c: Moved to...
245 * c-fold.cc: ...here.
246 * c-lang.c: Moved to...
247 * c-lang.cc: ...here.
248 * c-objc-common.c: Moved to...
249 * c-objc-common.cc: ...here.
250 * c-parser.c: Moved to...
251 * c-parser.cc: ...here.
252 * c-typeck.c: Moved to...
253 * c-typeck.cc: ...here.
254 * gccspec.c: Moved to...
255 * gccspec.cc: ...here.
256 * gimple-parser.c: Moved to...
257 * gimple-parser.cc: ...here.
258
2592022-01-17 Andrew Stubbs <ams@codesourcery.com>
260
261 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
262
617db51d
GA
2632022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
264
265 PR c++/103705
266 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
267 outer node for ARRAY_REFs.
268
62eb5308
GA
2692022-01-01 Jakub Jelinek <jakub@redhat.com>
270
271 PR objc/103639
272 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
273 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
274
2554e2da
GA
2752021-12-17 Marek Polacek <polacek@redhat.com>
276
277 PR c/103649
278 * c-decl.c (c_warn_unused_attributes): Don't warn for
279 attribute_ignored_p.
280 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
281 arguments when the attribute is ignored.
282
9c6586bc
GA
2832021-12-14 Jakub Jelinek <jakub@redhat.com>
284
285 PR c/103587
286 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
287 consume the pragma and silently skip to the pragma eol.
288
c8dcf64b
GA
2892021-12-12 Jonathan Wakely <jwakely@redhat.com>
290
291 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
292 * c-parser.c: Likewise.
293
4b4839e3
GA
2942021-12-09 Jakub Jelinek <jakub@redhat.com>
295
296 PR pch/71934
297 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
298 to resort_data.new_value.
299
641ff219
GA
3002021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
301
302 * c-parser.c (struct omp_dim): New struct type for use inside
303 c_parser_omp_variable_list.
304 (c_parser_omp_variable_list): Allow multiple levels of array and
305 component accesses in array section base-pointer expression.
306 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
307 c_parser_omp_var_list_parens.
308 (c_parser_omp_clause_from): Likewise.
309 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
310 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
311 POINTER_PLUS_EXPR.
312 (c_finish_omp_clauses): Extend allowed ranged of expressions
313 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
314
3152021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
316
317 PR middle-end/92120
318 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
319 call to c_parser_omp_variable_list to 'true'.
320 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
321 array base handling.
322 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
323
c177e806
GA
3242021-11-30 Thomas Schwinge <thomas@codesourcery.com>
325
326 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
327 orphan loop" checking.
328
3292021-11-30 Cesar Philippidis <cesar@codesourcery.com>
330 Thomas Schwinge <thomas@codesourcery.com>
331
332 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
333 OpenACC gang reductions.
334
3352021-11-30 Richard Biener <rguenther@suse.de>
336
337 * gimple-parser.c (c_parser_gimple_postfix_expression):
338 avoid unreachable code after break.
339
87cd82c8
GA
3402021-11-29 Eric Gallager <egallager@gcc.gnu.org>
341
342 PR other/103021
343 * Make-lang.in: Use ETAGS variable in TAGS target.
344
3452021-11-29 Richard Biener <rguenther@suse.de>
346
347 * c-typeck.c (c_tree_equal): Remove unreachable return.
348 * c-parser.c (get_matching_symbol): Likewise.
349
e1d43592
GA
3502021-11-23 Jakub Jelinek <jakub@redhat.com>
351
352 * c-typeck.c (c_clone_omp_udr): Don't initialize
353 id.transform_lang_insert_block.
354
9c077398
GA
3552021-11-19 Martin Sebor <msebor@redhat.com>
356
357 PR c++/33925
358 PR c/102867
359 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
360 code resulting from macro expansion.
361
3622021-11-19 Martin Liska <mliska@suse.cz>
363
364 Revert:
365 2021-11-19 Martin Liska <mliska@suse.cz>
366
367 * c-parser.c (add_debug_begin_stmt): Use option directly.
368
483092d3
GA
3692021-11-18 Matthias Kretz <m.kretz@gsi.de>
370
371 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
372 * c-parser.c (c_parser_postfix_expression): Likewise.
373
3742021-11-18 Martin Liska <mliska@suse.cz>
375
376 * c-parser.c (add_debug_begin_stmt): Use option directly.
377
280d2838
GA
3782021-11-17 Martin Sebor <msebor@redhat.com>
379
380 PR c/101702
381 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
382 bounds before deciding if they're constant.
383
e2b57363
GA
3842021-11-15 Jakub Jelinek <jakub@redhat.com>
385
386 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
387 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
388
b39265d4
GA
3892021-11-11 Jakub Jelinek <jakub@redhat.com>
390
391 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
392 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
393 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
394 OMP_CLAUSE_NUM_TEAMS_EXPR.
395 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
396 combined target teams even lower-bound expression.
397
3982021-11-11 Richard Biener <rguenther@suse.de>
399
400 * gimple-parser.c: Shuffle bitmap.h include.
401
18ae471f
GA
4022021-11-03 Joseph Myers <joseph@codesourcery.com>
403
404 PR c/103031
405 * c-convert.c (c_convert): New function, based on convert.
406 (convert): Make into wrapper of c_convert.
407 (convert_init): New function.
408 * c-typeck.c (enum impl_conv): Add ic_init_const.
409 (convert_for_assignment): Handle ic_init_const like ic_init. Add
410 new argument to convert_and_check call.
411 (digest_init): Pass ic_init_const to convert_for_assignment for
412 initializers required to be constant.
413
b4df2dd3
GA
4142021-11-02 Richard Sandiford <richard.sandiford@arm.com>
415
416 * c-tree.h (c_simulate_record_decl): Declare.
417 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
418 * c-decl.c (c_simulate_record_decl): New function.
419
c2bd5d8a
GA
4202021-10-22 Eric Gallager <egallager@gcc.gnu.org>
421
422 PR other/102663
423 * Make-lang.in: Add dummy c.install-dvi target.
424
93d183a5
GA
4252021-10-15 Richard Biener <rguenther@suse.de>
426
427 PR c/102763
428 * gimple-parser.c
429 (c_parser_gimple_postfix_expression_after_primary): Check
430 for a pointer do be dereferenced by ->.
431
5d5885c9
GA
4322021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
433
434 * c-parser.c (c_finish_omp_declare_variant): Change call from
435 c_omp_check_context_selector to omp_check_context_selector. Change
436 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
437
c9db17b8
GA
4382021-10-09 Jakub Jelinek <jakub@redhat.com>
439
440 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
441 (c_parser_omp_scan_loop_body): Use it.
442 (c_parser_omp_sections_scope): Likewise.
443
50e20ee6
GA
4442021-10-07 Richard Biener <rguenther@suse.de>
445
446 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
447
bb6194e0
GA
4482021-10-05 Richard Biener <rguenther@suse.de>
449
450 PR c/102605
451 * gimple-parser.c (c_parser_gimple_postfix_expression):
452 Accept more address _Literals.
453
da9c5f78
GA
4542021-10-04 Marek Polacek <polacek@redhat.com>
455
456 PR c++/97573
457 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
458
9d116bcc
GA
4592021-10-01 Martin Sebor <msebor@redhat.com>
460
461 PR c/102103
462 * c-typeck.c (maybe_warn_for_null_address): New function.
463 (build_binary_op): Call it.
464
4652021-10-01 Jakub Jelinek <jakub@redhat.com>
466 Richard Biener <rguenther@suse.de>
467
468 PR sanitizer/102515
469 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
470 for division even for SANITIZE_SI_OVERFLOW.
471
4722021-10-01 Jakub Jelinek <jakub@redhat.com>
473
474 * c-parser.c (c_parser_omp_clause_order): Set
475 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
476
fd133479
GA
4772021-09-28 Andrew Pinski <apinski@marvell.com>
478
479 PR c/32122
480 * c-parser.c (c_parser_statement_after_labels): Pass
481 the c_expr instead of the tree to c_finish_goto_ptr.
482 * c-typeck.c (c_finish_goto_ptr): Change the second
483 argument type to c_expr.
484 * c-tree.h (c_finish_goto_ptr): Likewise.
485 Error out if the expression was not of a pointer type.
486
e4777439
GA
4872021-09-22 Jakub Jelinek <jakub@redhat.com>
488
489 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
490 modifiers.
491
cf74e7b5
GA
4922021-09-18 Jakub Jelinek <jakub@redhat.com>
493
494 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
495 and reproducible modifiers.
496 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
497
4982021-09-18 Jakub Jelinek <jakub@redhat.com>
499
500 * c-parser.c (c_parser_omp_clause_default): Handle private and
501 firstprivate arguments, adjust diagnostics on unknown argument.
502
0a4cb439
GA
5032021-09-17 Jakub Jelinek <jakub@redhat.com>
504
505 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
506 is true.
507
a26206ec
GA
5082021-09-10 Jakub Jelinek <jakub@redhat.com>
509
510 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
511 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
512 don't call build_conditional_expr, instead build a COND_EXPR directly.
513 (c_parser_binary_expression): Avoid calling parser_build_binary_op
514 if omp_atomic_lhs even in more cases for >, < or ==.
515 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
516 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
517 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
518 * c-typeck.c (build_binary_op): For flag_openmp only handle
519 MIN_EXPR/MAX_EXPR.
520
b2748138
GA
5212021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
522
523 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
524 directive.
525
e11c6046
GA
5262021-09-01 Iain Sandoe <iain@sandoe.co.uk>
527
528 * c-decl.c (enum deprecated_states): Add unavailable state.
529 (merge_decls): Copy unavailability.
530 (quals_from_declspecs): Handle unavailable case.
531 (start_decl): Amend the logic handling suppression of nested
532 deprecation states to include unavailability.
533 (smallest_type_quals_location): Amend comment.
534 (grokdeclarator): Handle the unavailable deprecation state.
535 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
536 * c-tree.h (struct c_declspecs): Add unavailable_p.
537 * c-typeck.c (build_component_ref): Handle unavailability.
538 (build_external_ref): Likewise.
539
5402021-09-01 Roger Sayle <roger@nextmovesoftware.com>
541 Joseph Myers <joseph@codesourcery.com>
542
543 PR c/79412
544 * c-decl.c (duplicate_decls): On significant mismatches, mark the
545 types of both (non-function) decls as error_mark_node, so that the
546 middle-end can see the code is malformed.
547 (free_attr_access_data): Don't process if the type has been set to
548 error_mark_node.
549
6d51ee43
GA
5502021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
551
552 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
553 and 'ancestor' in 'target device' clauses.
554
38b19c5b
GA
5552021-08-23 Jakub Jelinek <jakub@redhat.com>
556
557 * c-parser.c (c_parser_omp_clause_num_tasks,
558 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
559
5b2876f9
GA
5602021-08-22 Martin Uecker <muecker@gwdg.de>
561
562 PR c/98397
563 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
564 for pointers to arrays with qualifiers.
565 (build_conditional_expr): For C23 don't lose qualifiers for pointers
566 to arrays when the other pointer is a void pointer. Update warnings.
567 (convert_for_assignment): Update warnings for C2X when converting from
568 void* with qualifiers to a pointer to array with the same qualifiers.
569
7c9e1645
GA
5702021-08-20 Jakub Jelinek <jakub@redhat.com>
571
572 * c-parser.c (c_parser_omp_error): New function.
573 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
574
5752021-08-20 Jakub Jelinek <jakub@redhat.com>
576
577 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
578 comma at the end of list.
579 (c_parser_omp_requires): Likewise.
580
b57fba5e
GA
5812021-08-19 Jakub Jelinek <jakub@redhat.com>
582
583 * c-parser.c (c_parser_omp_requires): Don't call
584 c_parser_peek_2nd_token and optionally consume token if current
585 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
586
6e529985
GA
5872021-08-18 Jakub Jelinek <jakub@redhat.com>
588
589 * c-parser.c (c_parser_omp_nothing): New function.
590 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
591
5922021-08-18 Jakub Jelinek <jakub@redhat.com>
593
594 * c-parser.c (c_parser_statement_after_labels): Add restart label
595 near the start of the function. If c_parser_pragma returns false,
596 goto restart.
597 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
598 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
599 return what c_parser_omp_declare returned. Return true instead of
600 false after emitting errors that the directive is not allowed in
601 pragma_stmt context.
602 (c_parser_omp_ordered): Return true instead of
603 false after emitting errors that the directive is not allowed in
604 pragma_stmt context.
605 (c_parser_omp_target_update): Likewise.
606 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
607 Change return type from tree to bool, return false if the
608 directive should be ignored in pragma_stmt contexts.
609 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
610 return their result directly.
611 (c_parser_omp_cancellation_point): Change return type from void to
612 bool, return false if the directive should be ignored in pragma_stmt
613 contexts.
614 (c_parser_omp_declare): Likewise.
615
2d14d64b
GA
6162021-08-17 Jakub Jelinek <jakub@redhat.com>
617
618 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
619 (c_parser_omp_scope): New function.
620 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
621
72be20e2
GA
6222021-08-12 Jakub Jelinek <jakub@redhat.com>
623
624 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
625 (c_parser_omp_clause_filter): New function.
626 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
627 (OMP_MASKED_CLAUSE_MASK): Define.
628 (c_parser_omp_masked): New function.
629 (c_parser_omp_parallel): Handle parallel masked.
630 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
631 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
632
6332021-08-12 Martin Uecker <muecker@gwdg.de>
634
635 PR c/101838
636 PR c/29970
637 * c-typeck.c (c_expr_sizeof_type): Evaluate
638 size expressions for structs of variable size.
639
6402021-08-12 Tobias Burnus <tobias@codesourcery.com>
641
642 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
643 'primary' as alias for 'master'.
644
3ae564ea
GA
6452021-08-10 Martin Uecker <muecker@gwdg.de>
646
647 PR c/29970
648 * c-typeck.c (c_expr_sizeof_expr): Evaluate
649 size expressions for structs of variable size.
650
f92f4778
GA
6512021-08-06 Tamar Christina <tamar.christina@arm.com>
652
653 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
654 * c-tree.h (c_simulate_enum_decl): Likewise.
655
6562021-08-06 Martin Sebor <msebor@redhat.com>
657
658 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
659 vec arguments to by-reference.
660 (c_finish_omp_declare_simd): Same.
661 (c_parser_compound_statement_nostart): Same.
662 (c_parser_for_statement): Same.
663 (c_parser_objc_methodprotolist): Same.
664 (c_parser_oacc_routine): Same.
665 (c_parser_omp_for_loop): Same.
666 (c_parser_omp_declare_simd): Same.
667
419c6c68
GA
6682021-07-21 Thomas Schwinge <thomas@codesourcery.com>
669 Joseph Myers <joseph@codesourcery.com>
670 Cesar Philippidis <cesar@codesourcery.com>
671
672 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
673 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
674 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
675 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
676
92d45509
GA
6772021-07-20 Martin Sebor <msebor@redhat.com>
678
679 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
680 by-const-reference.
681 * c-typeck.c (c_build_function_call_vec): Same.
682
d97d71a1
GA
6832021-07-15 Martin Sebor <msebor@redhat.com>
684
685 PR c/101289
686 PR c/97548
687 * c-decl.c (get_parm_array_spec): Strip nops.
688
6fba0eea
GA
6892021-07-06 Martin Sebor <msebor@redhat.com>
690
691 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
692
7a60a6e8
GA
6932021-07-02 Jakub Jelinek <jakub@redhat.com>
694
695 PR c/101297
696 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
697 appears before a CPP_NAME.
698
90708f87
GA
6992021-06-25 Martin Sebor <msebor@redhat.com>
700
701 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
702 warning_suppressed_p, suppress_warning, and copy_no_warning.
703 (diagnose_mismatched_decls): Same.
704 (duplicate_decls): Same.
705 (grokdeclarator): Same.
706 (finish_function): Same.
707 (c_write_global_declarations_1): Same.
708 * c-fold.c (c_fully_fold_internal): Same.
709 * c-parser.c (c_parser_expr_no_commas): Same.
710 (c_parser_postfix_expression): Same.
711 * c-typeck.c (array_to_pointer_conversion): Same.
712 (function_to_pointer_conversion): Same.
713 (default_function_array_conversion): Same.
714 (convert_lvalue_to_rvalue): Same.
715 (default_conversion): Same.
716 (build_indirect_ref): Same.
717 (build_function_call_vec): Same.
718 (build_atomic_assign): Same.
719 (build_unary_op): Same.
720 (c_finish_return): Same.
721 (emit_side_effect_warnings): Same.
722 (c_finish_stmt_expr): Same.
723 (c_omp_clause_copy_ctor): Same.
724
9aa8327e
GA
7252021-06-24 Jakub Jelinek <jakub@redhat.com>
726
727 PR c/101176
728 * c-parser.c (c_parser_has_attribute_expression): Set source range for
729 the result.
730
7312021-06-24 Jakub Jelinek <jakub@redhat.com>
732
733 PR c/101171
734 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
735 error_mark_node.
736
7372021-06-24 Jakub Jelinek <jakub@redhat.com>
738
739 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
740 C_ORT_OMP for clauses on target construct.
741 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
742 (c_parser_omp_target): For non-combined target add
743 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
744 C_ORT_OMP_TARGET to c_finish_omp_clauses.
745 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
746 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
747 never present on C_ORT_*DECLARE_SIMD.
748 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
749 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
750 corresponding map clauses.
751
2f080224
GA
7522021-06-21 Jakub Jelinek <jakub@redhat.com>
753
754 PR inline-asm/100785
755 * c-typeck.c (c_mark_addressable): Diagnose trying to make
756 bit-fields addressable.
757
ede6c356
GA
7582021-06-15 Robin Dapp <rdapp@linux.ibm.com>
759
760 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
761 similar.
762
8dc48181
GA
7632021-06-14 Tobias Burnus <tobias@codesourcery.com>
764
765 PR c/100913
766 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
767 var in the error case.
768
438aac59
GA
7692021-06-07 Eric Botcazou <ebotcazou@adacore.com>
770
771 PR c/100920
772 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
773 spot built-in functions.
774
7d6987e9
GA
7752021-06-06 Jakub Jelinek <jakub@redhat.com>
776
777 PR c/100902
778 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
779 even when target is combined with other constructs.
780
7812021-06-06 Eric Botcazou <ebotcazou@adacore.com>
782
783 PR c/100920
784 * c-decl.c (finish_struct): Fix thinko in previous change.
785 * c-typeck.c (convert_for_assignment): Do not warn on pointer
786 assignment and initialization for storage order purposes if the
787 RHS is a call to a DECL_IS_MALLOC function.
788
600f90cb
GA
7892021-06-04 Martin Sebor <msebor@redhat.com>
790
791 PR c/100783
792 * c-objc-common.c (print_type): Handle erroneous types.
793
440c8a0a
GA
7942021-06-03 Jakub Jelinek <jakub@redhat.com>
795
796 PR c++/100859
797 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
798 after depend only cases.
799
ee682192
GA
8002021-05-31 Richard Biener <rguenther@suse.de>
801
802 PR c++/88601
803 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
804 * c-parser.c (c_parser_postfix_expression): Likewise.
805
48166757
GA
8062021-05-28 Richard Biener <rguenther@suse.de>
807
808 PR c/100803
809 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
810 invalid if conditions.
811
8122021-05-28 Jakub Jelinek <jakub@redhat.com>
813
814 PR middle-end/99928
815 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
816 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
817 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
818 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
819 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
820 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
821 if present in map_head, map_field_head or map_firstprivate_head
822 bitmaps.
823
8242021-05-28 Tobias Burnus <tobias@codesourcery.com>
825
826 * c-parser.c (c_parser_omp_clause_affinity): New.
827 (c_parser_omp_clause_name, c_parser_omp_variable_list,
828 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
829 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
830 c_finish_omp_clauses): Likewise.
831
01c59ef2
GA
8322021-05-26 Eric Botcazou <ebotcazou@adacore.com>
833
834 PR c/100653
835 * c-decl.c (finish_struct): Warn for a union containing an aggregate
836 field with a differing scalar storage order.
837
2832d51b
GA
8382021-05-21 Jakub Jelinek <jakub@redhat.com>
839
840 PR middle-end/99928
841 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
842 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
843 if a decl is mentioned both in map clause and in such firstprivate
844 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
845
65f32e5d
GA
8462021-05-19 Jakub Jelinek <jakub@redhat.com>
847
848 PR middle-end/99928
849 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
850 master when combined with taskloop.
851 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
852 parallel master when not combined with taskloop.
853
a8daf9a1
GA
8542021-05-18 Richard Biener <rguenther@suse.de>
855
856 PR c/100522
857 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
858 Diagnose calls to non-functions.
859 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
860
a7ffc1ef
GA
8612021-05-17 Richard Biener <rguenther@suse.de>
862
863 PR c/100625
864 * gimple-parser.c (c_parser_gimple_label): Avoid building
865 a GIMPLE label with NULL label decl.
866
f9af11c7
GA
8672021-05-13 Martin Sebor <msebor@redhat.com>
868
869 PR c/100550
870 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
871
0ff3a0f2
GA
8722021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
873
874 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
875 'close'.
876
aa891c56
GA
8772021-05-10 Martin Liska <mliska@suse.cz>
878
879 * c-aux-info.c (affix_data_type): Use startswith
880 function instead of strncmp.
881 * c-typeck.c (build_function_call_vec): Likewise.
882 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
883
62d87a32
GA
8842021-05-07 Eric Botcazou <ebotcazou@adacore.com>
885
886 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
887 on the address of a pointer field in a record with reverse SSO.
888
99e8df7a
GA
8892021-05-04 Tobias Burnus <tobias@codesourcery.com>
890
891 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
892 for || and && reductions.
893
3c8e539d
GA
8942021-04-29 Joseph Myers <joseph@codesourcery.com>
895
896 * c-typeck.c (function_types_compatible_p): For C2X, treat
897 unprototyped function as compatible with non-variadic prototyped
898 function even if some argument types are changed by the default
899 argument promotions.
900
ee351f7f
GA
9012021-04-15 Martin Sebor <msebor@redhat.com>
902
903 PR c/99420
904 PR c/99972
905 * c-decl.c (pushdecl): Always propagate type attribute.
906
9072021-04-15 Richard Sandiford <richard.sandiford@arm.com>
908
909 PR c/98852
910 * c-typeck.c (c_common_type): Do not drop attributes that
911 affect type identity.
912
1d54b138
GA
9132021-04-10 Jakub Jelinek <jakub@redhat.com>
914
915 PR c/99990
916 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
917 error_mark_node.
918
4493b1c1
GA
9192021-03-25 Jakub Jelinek <jakub@redhat.com>
920
921 PR c++/99565
922 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
923 to operand_equal_p.
924
5f256a70
GA
9252021-03-19 Jakub Jelinek <jakub@redhat.com>
926
927 PR c/99588
928 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
929 with modifycode NOP_EXPR produces and mark the _Atomic var as read
930 if found.
931 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
932 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
933 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
934
3c5b6d24
GA
9352021-03-15 Tobias Burnus <tobias@codesourcery.com>
936
937 PR c++/99509
938 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
939 ensure that the varpool node is marked as offloadable.
940
ceae9533
GA
9412021-03-05 Tobias Burnus <tobias@codesourcery.com>
942
943 PR c/99137
944 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
945
4028d01a
GA
9462021-02-24 Martin Sebor <msebor@redhat.com>
947
948 PR middle-end/97172
949 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
950
bf81237e
GA
9512021-02-18 Jakub Jelinek <jakub@redhat.com>
952
953 PR c/99136
954 * c-typeck.c (c_finish_return): Don't wrap retval into
955 EXCESS_PRECISION_EXPR in functions that return void.
956
0c5cdb31
GA
9572021-02-11 Marek Polacek <polacek@redhat.com>
958
959 * c-parser.c (c_parser_if_statement): Use vec_free.
960
a19dd5e6
GA
9612021-02-04 Martin Sebor <msebor@redhat.com>
962
963 PR c/97882
964 * c-decl.c (locate_old_decl): Add type to diagnostic output.
965 (diagnose_mismatched_decls): Same.
966 (start_function): Introduce temporaries for better readability.
967 * c-typeck.c (comptypes_internal): Only consider complete enum
968 types in comparisons with integers.
969
f7884fb1
GA
9702021-02-01 Martin Sebor <msebor@redhat.com>
971
972 PR middle-end/97172
973 * c-decl.c (free_attr_access_data): New function.
974 (c_parse_final_cleanups): Call free_attr_access_data.
975
59cf67d1
GA
9762021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
977
978 * c-parser.c (c_parser_omp_clause_detach): New.
979 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
980 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
981 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
982 clause. Prevent use of detach with mergeable and overriding the
983 data sharing mode of the event handle.
984
2f7f0d32
GA
9852021-01-15 Jakub Jelinek <jakub@redhat.com>
986
987 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
988 unqualified element type and then call c_build_qualified_type on the
989 ARRAY_TYPE.
990
7d187e4f
GA
9912021-01-07 Richard Biener <rguenther@suse.de>
992
993 * gimple-parser.c (c_parser_gimple_compound_statement): Only
994 reallocate loop array if it is too small.
995
eefe499f
GA
9962020-12-16 Martin Uecker <muecker@gwdg.de>
997
998 PR c/98047
999 * c-typeck.c (build_modify_expr): Drop qualifiers.
1000
10012020-12-16 Martin Uecker <muecker@gwdg.de>
1002
1003 PR c/98260
1004 * c-parser.c (c_parser_expression): Look into
1005 nop expression when marking expressions as read.
1006
d52945ce
GA
10072020-12-14 Martin Liska <mliska@suse.cz>
1008
1009 PR sanitizer/98204
1010 * c-typeck.c (pointer_diff): Do not emit a top-level
1011 sanitization.
1012 (build_binary_op): Likewise.
1013
ca2bd949
GA
10142020-12-09 Tobias Burnus <tobias@codesourcery.com>
1015
1016 * c-parser.c (c_parser_omp_allocate): New.
1017 (c_parser_omp_construct): Call it.
1018
10192020-12-09 Richard Biener <rguenther@suse.de>
1020
1021 PR c/98200
1022 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1023 early on error.
1024
bc8a7013
GA
10252020-12-07 Martin Uecker <muecker@gwdg.de>
1026
1027 PR c/97981
1028 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1029 that drops qualifiers to the end of the function.
1030
d48df6f2
GA
10312020-11-26 Martin Uecker <muecker@gwdg.de>
1032
1033 PR c/65455
1034 PR c/92935
1035 * c-parser.c (c_parser_declaration_or_fndef): Remove
1036 redundant code to drop qualifiers of _Atomic types for __auto_type.
1037 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1038 types for __typeof__.
1039
1e2c9a27
GA
10402020-11-24 Jakub Jelinek <jakub@redhat.com>
1041
1042 PR c/97958
1043 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1044 expressions, use make_node instead of build2 to avoid checking build2
1045 performs.
1046
8e6198d0
GA
10472020-11-23 Joseph Myers <joseph@codesourcery.com>
1048
1049 PR c/95630
1050 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1051 for comparisons of complete and incomplete pointers.
1052
7a97e2fc
GA
10532020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1054
1055 * c-aux-info.c (gen_type): Support opaque types.
1056
82e5048e
GA
10572020-11-20 Martin Sebor <msebor@redhat.com>
1058
1059 PR middle-end/97879
1060 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1061
10622020-11-20 Jakub Jelinek <jakub@redhat.com>
1063
1064 PR other/97911
1065 * Make-lang.in (c.serial): Change from goal to a variable.
1066 (.PHONY): Drop c.serial.
1067
10682020-11-20 Martin Uecker <muecker@gwdg.de>
1069
1070 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1071
d62586ee
GA
10722020-11-19 Jakub Jelinek <jakub@redhat.com>
1073
1074 PR c/97860
1075 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1076 error_operand_p.
1077
25bb75f8
GA
10782020-11-18 Jakub Jelinek <jakub@redhat.com>
1079
1080 * Make-lang.in (c.serial): New goal.
1081 (.PHONY): Add c.serial c.prev.
1082 (cc1$(exeext)): Call LINK_PROGRESS.
1083
77f67db2
GA
10842020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1085
1086 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1087 goto too.
1088 * c-typeck.c (build_asm_expr): Remove an assert checking output
1089 absence for asm goto.
1090
10912020-11-13 Jakub Jelinek <jakub@redhat.com>
1092
1093 * c-typeck.c (c_finish_omp_clauses): Don't clear
1094 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1095
10962020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1097
1098 PR objc/77404
1099 * c-parser.c (c_parser_objc_class_definition): Pass the
1100 location of the class name to the interface declaration.
1101
bb622641
GA
11022020-11-10 Strager Neds <strager.nds@gmail.com>
1103
1104 * c-decl.c (merge_decls): Use new overload of
1105 set_decl_section_name.
1106
11072020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1108
1109 * c-parser.c (c_parser_omp_target_data): Add use of
1110 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1111 handled map clause kind.
1112 (c_parser_omp_target_enter_data): Likewise.
1113 (c_parser_omp_target_exit_data): Likewise.
1114 (c_parser_omp_target): Likewise.
1115 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1116 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1117 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1118 same struct field access to co-exist on OpenMP construct.
1119
2da7ee05
GA
11202020-11-07 Martin Uecker <muecker@gwdg.de>
1121
1122 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1123 (c_parser_all_labels): Likewise.
1124
44cab2d8
GA
11252020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1126
1127 * c-parser.c (c_parser_objc_at_property_declaration):
1128 Improve parsing fidelity. Associate better location info
1129 with @property attributes. Clean up the interface to
1130 objc_add_property_declaration ().
1131
11322020-11-06 Nathan Sidwell <nathan@acm.org>
1133
1134 * c-decl.c (diagnose_mismatched_decls): Rename
1135 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1136 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1137 (collect_source_refs): Likewise.
1138 * c-typeck.c (inform_declaration, inform_for_arg)
1139 (convert_for_assignment): Likewise.
1140
11412020-11-06 Tobias Burnus <tobias@codesourcery.com>
1142
1143 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1144 OpenACC matching.
1145 (c_parser_omp_construct): Update call.
1146
35c125cb
GA
11472020-11-04 Jakub Jelinek <jakub@redhat.com>
1148
1149 PR c++/97670
1150 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1151 find underlying decl to clear in the aligned_head bitmap.
1152
11532020-11-04 Joseph Myers <joseph@codesourcery.com>
1154
1155 * c-decl.c (handle_nodiscard_attribute): New.
1156 (std_attribute_table): Add nodiscard.
1157 * c-parser.c (c_parser_std_attribute): Expect argument to
1158 nodiscard attribute to be a string. Do not special-case ignoring
1159 nodiscard.
1160 * c-typeck.c (maybe_warn_nodiscard): New.
1161 (build_compound_expr, emit_side_effect_warnings): Call
1162 maybe_warn_nodiscard.
1163 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1164 emit_side_effect_warnings if warn_unused_result.
1165
4f0606fe
GA
11662020-10-29 Asher Gordon <AsDaGo@posteo.net>
1167
1168 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1169 with XDELETE.
1170 (finish_init): Likewise.
1171 (pop_init_level): Likewise.
1172
e93aae4a
GA
11732020-10-28 Joseph Myers <joseph@codesourcery.com>
1174
1175 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1176 error_at for omitted parameter name.
1177
11782020-10-28 Jakub Jelinek <jakub@redhat.com>
1179
1180 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1181 (c_parser_omp_clause_allocate): New function.
1182 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1183 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1184 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1185 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1186 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1187 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1188 PRAGMA_OMP_CLAUSE_ALLOCATE.
1189 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1190
89bb01e7
GA
11912020-10-27 Joseph Myers <joseph@codesourcery.com>
1192
1193 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1194 standard attributes.
1195
efe71fcc
GA
11962020-10-23 Marek Polacek <polacek@redhat.com>
1197
1198 PR c++/91741
1199 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1200 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1201 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1202 * c-tree.h (char_type_p): Declare.
1203 * c-typeck.c (char_type_p): No longer static.
1204
12052020-10-23 Martin Sebor <msebor@redhat.com>
1206
1207 PR middle-end/97552
1208 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1209
2fe5b7d1
GA
12102020-09-19 Martin Sebor <msebor@redhat.com>
1211
1212 PR c/50584
1213 * c-decl.c (lookup_last_decl): Define new function.
1214 (c_decl_attributes): Call it.
1215 (start_decl): Add argument and use it.
1216 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1217 (get_parm_array_spec): Define new function.
1218 (push_parm_decl): Call get_parm_array_spec.
1219 (start_function): Call warn_parm_array_mismatch. Build attribute
1220 access and add it to current function.
1221 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1222 in forms of array parameters.
1223 * c-tree.h (start_decl): Add argument.
1224
12252020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1226
1227 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1228 with...
1229 (in_statement): New.
1230 (start_function): Adjust for above change.
1231 (c_push_function_context, c_pop_function_context): Likewise.
1232 * c-lang.h (struct language_function): Likewise.
1233 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1234 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1235 New.
1236 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1237 (c_parser_switch_statement): Adjust break/switch context handling
1238 and calls to renamed functions.
1239 (c_parser_while_statement): Adjust break/switch context handling and
1240 build a WHILE_STMT.
1241 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1242 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1243 (c_parser_omp_for_loop): Adjust break/switch context handling.
1244 * c-tree.h (c_break_label, c_cont_label): Delete.
1245 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1246 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1247 (in_statement, switch_statement_break_seen_p): Declare.
1248 (c_start_case, c_finish_case): Renamed to...
1249 (c_start_switch, c_finish_switch).
1250 (c_finish_bc_stmt): Adjust arguments.
1251 * c-typeck.c (build_function_call_vec): Don't try to print
1252 statements with %qE format.
1253 (struct c_switch): Rename switch_expr field to switch_stmt.
1254 Add break_stmt_seen_p field.
1255 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1256 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1257 (do_case): Update for changes to struct c_switch.
1258 (c_finish_case): Rename to c_finish_switch. Update for changes to
1259 struct c_switch and change of representation from SWITCH_EXPR to
1260 SWITCH_STMT.
1261 (c_finish_loop): Delete.
1262 (c_finish_bc_stmt): Update to reflect changes to break/continue
1263 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1264 of a GOTO_EXPR except for objc foreach loops.
1265
e1a4a8a0
GA
12662020-09-01 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR c++/96867
1269 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1270 only on PARM_DECLs.
1271
8f7ea26a
GA
12722020-08-28 Martin Sebor <msebor@redhat.com>
1273
1274 PR c/96596
1275 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1276 argument type.
1277
8b394f01
GA
12782020-08-27 Martin Liska <mliska@suse.cz>
1279
1280 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1281 growth function to true.
1282
db0f6efe
GA
12832020-08-25 Tobias Burnus <tobias@codesourcery.com>
1284
1285 PR c/96678
1286 * c-typeck.c (handle_omp_array_sections_1): Talk about
1287 array function parameter in the error message.
1288
5c265693
GA
12892020-08-18 Jakub Jelinek <jakub@redhat.com>
1290
1291 PR c/96571
1292 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1293 to int, holding index of the match. Call mark_exp_read on the selector
1294 expression and on expressions other than the selected one.
1295
4967ca2f
GA
12962020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1297
1298 PR c/96377
1299 * c-typeck.c (process_init_element): Split test for whether to
1300 recurse into a record, union or array into...
1301 (initialize_elementwise_p): ...this new function. Don't recurse
1302 into a vector type if the initialization value is also a vector.
1303
48cc2e46
GA
13042020-07-31 Richard Biener <rguenther@suse.de>
1305
1306 PR debug/96383
1307 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1308 Define to c_common_finalize_early_debug.
1309
3ea9abca
GA
13102020-07-22 Tobias Burnus <tobias@codesourcery.com>
1311
1312 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1313 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1314 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1315
30430061
GA
13162020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1317
1318 PR target/95237
1319 * c-decl.c (finish_decl): Call target hook
1320 lower_local_decl_alignment to lower local decl alignment.
1321
3f8ca9cb
GA
13222020-07-09 Julian Brown <julian@codesourcery.com>
1323 Thomas Schwinge <thomas@codesourcery.com>
1324
1325 PR middle-end/95270
1326 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1327 for standalone attach/detach clauses.
1328
a82c4c4c 13292020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1330
1331 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1332 set, warn for conversion between pointers that point to incompatible
1333 scalar storage orders.
1334
f60ee68d
GA
13352020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1336
1337 * c-parser.c (c_parser_statement_after_labels): Pass correct
1338 parameters to c_parser_do_statement.
1339
56638b9b
GA
13402020-06-16 Jakub Jelinek <jakub@redhat.com>
1341
1342 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1343 c_in_omp_for.
1344 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1345 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1346 c_finish_omp_for.
1347 * c-tree.h (c_in_omp_for): Declare.
1348 * c-typeck.c (c_in_omp_for): Define.
1349 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1350 (digest_init): Likewise.
1351 (build_binary_op): Likewise.
1352
13532020-06-16 Jakub Jelinek <jakub@redhat.com>
1354
1355 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1356 from kind by comma rather than colon.
1357
1a59f3db
GA
13582020-06-05 Mark Wielaard <mark@klomp.org>
1359
1360 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1361 an undeclared builtin, then add a fixit header hint, if found.
1362 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1363 warning_at about implicit builtin declaration type mismatch.
1364
9a5b7438
GA
13652020-06-03 Mark Wielaard <mark@klomp.org>
1366
1367 * c-parser.c (struct c_parser): Add seen_string_literal
1368 bitfield.
1369 (c_parser_consume_token): Reset seen_string_literal.
1370 (c_parser_error_richloc): Add name_hint if seen_string_literal
1371 and next token is a CPP_NAME and we have a missing header
1372 suggestion for the name.
1373 (c_parser_string_literal): Set seen_string_literal.
1374
13752020-06-03 Mark Wielaard <mark@klomp.org>
1376
1377 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1378 scope with matching_parens after CPP_OPEN_PAREN.
1379
13802020-06-03 Tobias Burnus <tobias@codesourcery.com>
1381
1382 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1383
53ffb43a
GA
13842020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1385
1386 * Make-lang.in: Remove extra slash.
1387
8f66f175
ML
13882020-05-19 Martin Liska <mliska@suse.cz>
1389
1390 * c-parser.c: Fix typo.
1391
49ddde69
JJ
13922020-05-14 Jakub Jelinek <jakub@redhat.com>
1393
1394 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1395
eb72dc66
RB
13962020-05-07 Richard Biener <rguenther@suse.de>
1397
1398 PR middle-end/94703
1399 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1400 DECL_GIMPLE_REG_P.
1401
bf915591
JJ
14022020-04-30 Jakub Jelinek <jakub@redhat.com>
1403
1404 PR c/94842
1405 * c-decl.c (set_labels_context_r): In addition to context-less
1406 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1407 parent function if any.
1408 (store_parm_decls): Adjust comment.
1409
e1113ffb
JJ
14102020-04-19 Jakub Jelinek <jakub@redhat.com>
1411
1412 PR objc/94637
1413 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1414 two CPP_COLON tokens.
1415
2e389749
JJ
14162020-04-17 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR other/94629
1419 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1420 to data.clauses.
1421
2dc9294c
JJ
14222020-04-15 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR c/94593
1425 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1426 requires directive when not at file scope.
1427
13e41d8b
TB
14282020-04-08 Tobias Burnus <tobias@codesourcery.com>
1429
1430 PR middle-end/94120
1431 * c-decl.c (c_check_in_current_scope): New function.
1432 * c-tree.h (c_check_in_current_scope): Declare it.
1433 * c-parser.c (c_parser_oacc_declare): Add check that variables
1434 are declared in the same scope as the directive. Fix handling
1435 of namespace vars.
1436
4df50a05
JJ
14372020-04-07 Jakub Jelinek <jakub@redhat.com>
1438
1439 PR c++/94512
1440 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1441 if c_parser_omp_master succeeded.
1442
5db9e893
JJ
14432020-03-23 Jakub Jelinek <jakub@redhat.com>
1444
1445 PR gcov-profile/94029
1446 PR c/94239
1447 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1448 the function_start_locus location. Don't do that afterwards for the
1449 __GIMPLE body parsing.
1450
9def91e9
JJ
14512020-03-19 Jakub Jelinek <jakub@redhat.com>
1452
1453 PR gcov-profile/94029
1454 * c-tree.h (finish_function): Add location_t argument defaulted to
1455 input_location.
1456 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1457 set it to the locus of closing } if non-NULL.
1458 (c_parser_compound_statement_nostart): Return locus of closing }.
1459 (c_parser_parse_rtl_body): Likewise.
1460 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1461 finish_function.
1462 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1463 input_location to set function_end_locus.
1464
046c5890
JJ
14652020-03-17 Jakub Jelinek <jakub@redhat.com>
1466
1467 PR c/94172
1468 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1469 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1470 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1471 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1472 ENUMERAL_TYPEs.
1473 (finish_incomplete_vars): New function, moved from finish_struct. Use
1474 relayout_decl instead of layout_decl.
1475 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1476 being TYPE_VFIELD. Use finish_incomplete_vars.
1477 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1478 finish_incomplete_vars.
1479 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1480 also on ENUMERAL_TYPEs.
1481
c015ff8c
JJ
14822020-03-16 Jakub Jelinek <jakub@redhat.com>
1483
1484 PR c/94179
1485 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1486
f2e9fe5f
MS
14872020-03-13 Martin Sebor <msebor@redhat.com>
1488
1489 PR c/94040
1490 * c-decl.c (builtin_structptr_type_count): New constant.
1491 (match_builtin_function_types): Reject decls that are incompatible
1492 in types pointed to by pointers.
1493 (diagnose_mismatched_decls): Adjust comments.
1494
c9d70946
JM
14952020-03-05 Joseph Myers <joseph@codesourcery.com>
1496
1497 PR c/93577
1498 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1499 empty when initialized type is error_mark_node.
1500 (set_designator, process_init_element): Ignore initializers for
1501 elements of a variable-size type or of error_mark_node.
1502
726e292d
MS
15032020-03-01 Martin Sebor <msebor@redhat.com>
1504
1505 PR middle-end/93926
1506 * c-decl.c (types_close_enough_to_match): New function.
1507 (match_builtin_function_types):
1508 (diagnose_mismatched_decls): Add missing inform call to a warning.
1509
a499c2f8
MS
15102020-03-01 Martin Sebor <msebor@redhat.com>
1511
1512 PR c/93812
1513 * c-typeck.c (build_functype_attribute_variant): New function.
1514 (composite_type): Call it.
1515
9c3da8cc
JJ
15162020-02-25 Jakub Jelinek <jakub@redhat.com>
1517
1518 PR other/93912
1519 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1520 Rename last argument from probablity to probability.
1521
bacdd5e9
JJ
15222020-02-13 Jakub Jelinek <jakub@redhat.com>
1523
1524 PR c/93576
1525 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1526 *expr if it has side effects.
1527
f9eb0973
JL
15282020-01-30 Jeff Law <law@redhat.com>
1529
1530 PR c/88660
1531 * c-parser.c (c_parser_switch_statement): Make sure to request
1532 marking the switch expr as used.
1533
ac68e287
JM
15342020-01-22 Joseph Myers <joseph@codesourcery.com>
1535
1536 PR c/93348
1537 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1538 argument with integer operands.
1539
852f0ae8
KK
15402020-01-16 Kerem Kat <keremkat@gmail.com>
1541
1542 PR c/92833
1543 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1544 to support 4 available tokens.
1545
e2346a33
JM
15462020-01-15 Joseph Myers <joseph@codesourcery.com>
1547
1548 PR c/93072
1549 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1550 determine whether to set DECL_CONTEXT.
1551
3d77686d
JM
15522020-01-13 Joseph Myers <joseph@codesourcery.com>
1553
1554 PR c/93241
1555 * c-typeck.c (build_c_cast): Check for expressions with integer
1556 operands that can occur in an unevaluated part of an integer
1557 constant expression and call note_integer_operands as needed.
1558
f74c4b2c
RB
15592019-01-08 Richard Biener <rguenther@suse.de>
1560
1561 PR middle-end/93199
1562 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1563 permanently.
1564
8d9254fc
JJ
15652020-01-01 Jakub Jelinek <jakub@redhat.com>
1566
1567 Update copyright years.
1568
39292e25
EB
15692019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1570
1571 * c-decl.c (collect_source_ref_cb): Delete.
1572 (for_each_global_decl): Rename into...
1573 (collect_source_refs): ...this. Call collect_source_ref directly.
1574 (c_parse_final_cleanups): Always call collect_source_ref on the main
1575 input filename.
1576
519d7496
JB
15772019-12-19 Julian Brown <julian@codesourcery.com>
1578 Cesar Philippidis <cesar@codesourcery.com>
1579
1580 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1581 detach clauses.
1582 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1583 Allow deref (->) in variable lists if true.
1584 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1585 Pass to c_parser_omp_variable_list.
1586 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1587 call to c_parser_omp_variable_list.
1588 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1589 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1590 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1591 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1592 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1593 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1594 and detach. Support deref.
1595 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1596 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1597 (c_oacc_check_attachments): New function.
1598 (c_finish_omp_clauses): Check attach/detach arguments for being
1599 pointers using above. Support deref.
1600
a6163563
JB
16012019-12-19 Julian Brown <julian@codesourcery.com>
1602 Maciej W. Rozycki <macro@codesourcery.com>
1603 Tobias Burnus <tobias@codesourcery.com>
1604 Thomas Schwinge <thomas@codesourcery.com>
1605
1606 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1607 (c_parser_oacc_data_clause): Likewise.
1608 (c_parser_oacc_all_clauses): Likewise.
1609 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1610 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1611 PRAGMA_OACC_CLAUSE_NO_CREATE.
1612 * c-typeck.c (handle_omp_array_sections): Support
1613 GOMP_MAP_NO_ALLOC.
1614
d68f5d45
DM
16152019-12-09 David Malcolm <dmalcolm@redhat.com>
1616
1617 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1618 Replace label_text ctor calls.
1619
4691bf46
JM
16202019-12-04 Joseph Myers <joseph@codesourcery.com>
1621
1622 PR c/36941
1623 PR c/88827
1624 * c-typeck.c (convert_lvalue_to_rvalue): Call
1625 require_complete_type for arguments not of void types.
1626 (build_indirect_ref): Do not diagnose dereferencing pointers to
1627 incomplete types.
1628 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1629
85d11957
JM
16302019-12-03 Joseph Myers <joseph@codesourcery.com>
1631
1632 PR c/88704
1633 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1634 old-style parameter definitions.
1635
4569f8b3
SL
16362019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1637
1638 PR target/92499
1639
1640 * c-decl.c (flexible_array_type_p): Move to common code.
1641
65ef05d0
RS
16422019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1643
1644 * c-decl.c (start_decl): Allow initialization of variables whose
1645 size is a POLY_INT_CST.
1646 (finish_decl): Use verify_type_context to check whether the target
1647 allows variables with a particular type to have static or thread-local
1648 storage duration. Don't raise a second error if such variables do
1649 not have a constant size.
1650 (grokdeclarator): Use verify_type_context to check whether the
1651 target allows fields or array elements to have a particular type.
1652 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1653 the target allows pointer difference for the types involved.
1654 (build_unary_op): Likewise for pointer increment and decrement.
1655
34b43828
JM
16562019-11-29 Joseph Myers <joseph@codesourcery.com>
1657
1658 * c-parser.c (struct c_parser): Add members raw_tokens and
1659 raw_tokens_used.
1660 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1661 using previously-lexed raw tokens.
1662 (c_parser_peek_nth_token_raw)
1663 (c_parser_check_balanced_raw_token_sequence): New functions.
1664 (c_parser_nth_token_starts_std_attributes): Use
1665 c_parser_check_balanced_raw_token_sequence for Objective-C.
1666
5b8d9367
JM
16672019-11-25 Joseph Myers <joseph@codesourcery.com>
1668
1669 PR c/91985
1670 * c-decl.c (finish_declspecs): Use int instead of decimal
1671 floating-point types if decimal floating-point not supported.
1672
1723e1be
JM
16732019-11-25 Joseph Myers <joseph@codesourcery.com>
1674
1675 * c-tree.h (struct c_declarator): Use a structure for id member.
1676 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1677 declarators at the start, not when handling individual declarators
1678 later. Use u.id.id instead of u.id.
1679 (grokfield): Use u.id.id instead of u.id.
1680 (build_id_declarator): Set u.id.id and u.id.attrs.
1681 (finish_declspecs): Handle postfix attributes in case of typedef
1682 name or typeof used.
1683 * c-parser.c (c_parser_direct_declarator)
1684 (c_parser_direct_declarator_inner): Place declarator for
1685 attributes inside that for function or array, not outside. Set
1686 u.id.attrs for identifiers.
1687 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1688 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1689 instead of u.id.
1690
bdaf8be1
JJ
16912019-11-22 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c/90677
1694 * c-decl.c (identifier_global_tag): Define.
1695
3e00ba47
RB
16962019-11-20 Richard Biener <rguenther@suse.de>
1697
1698 PR c/92088
1699 * c-decl.c (grokdeclarator): Prevent inlining of nested
1700 function with VLA arguments.
1701
8c5b727a
JM
17022019-11-20 Joseph Myers <joseph@codesourcery.com>
1703
1704 * c-decl.c (c_warn_type_attributes): New function.
1705 (groktypename, grokdeclarator, finish_declspecs): Call
1706 c_warn_type_attributes before applying attributes to types.
1707 * c-tree.h (c_warn_type_attributes): Declare.
1708
192961ff
JM
17092019-11-19 Joseph Myers <joseph@codesourcery.com>
1710
1711 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1712 standard attributes.
1713 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1714 pedwarn for unknown standard attributes and return error_mark_node
1715 for them.
1716
20a38017
MM
17172019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1718
1719 * c-parser.c (c_parser_parse_rtl_body): Always call
1720 run_rtl_passes, even if startwith pass is not provided.
1721
d5fbe5e0
JM
17222019-11-15 Joseph Myers <joseph@codesourcery.com>
1723
1724 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1725 duplicate standard attributes.
1726
97cc1187
JM
17272019-11-15 Joseph Myers <joseph@codesourcery.com>
1728
1729 * c-decl.c (std_attribute_table): Add maybe_unused.
1730
f8aea5e3
JM
17312019-11-15 Joseph Myers <joseph@codesourcery.com>
1732
1733 * c-decl.c (std_attribute_table): Add fallthrough.
1734 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1735 attribute at top level.
1736
2cc94aa8
JM
17372019-11-15 Joseph Myers <joseph@codesourcery.com>
1738
1739 * c-decl.c (std_attribute_table): New.
1740 (c_init_decl_processing): Register attributes from
1741 std_attribute_table.
1742 * c-parser.c (c_parser_attribute_arguments): Add arguments
1743 require_string and allow_empty_args. All callers changed.
1744 (c_parser_std_attribute): Set require_string argument for
1745 "deprecated" attribute.
1746
7c5890cc
JM
17472019-11-14 Joseph Myers <joseph@codesourcery.com>
1748
1749 * c-parser.c (c_parser_postfix_expression)
1750 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1751 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1752
e8738f4e
RS
17532019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1754
1755 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1756 of build_same_sized_truth_vector_type.
1757 (build_vec_cmp): Likewise.
1758
b2417b59
JJ
17592019-11-14 Jakub Jelinek <jakub@redhat.com>
1760
bedb7f04
JJ
1761 * c-parser.c (c_parser_omp_context_selector): Don't require score
1762 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1763 negative score.
1764
b2417b59
JJ
1765 * c-parser.c (c_parser_omp_context_selector): Rename
1766 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1767 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1768 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1769 and string literals.
1770
4e03c3a7
JM
17712019-11-14 Joseph Myers <joseph@codesourcery.com>
1772
1773 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1774 ctsk_tagfirstref_attrs.
1775 (struct c_declspecs): Update description of attrs. Add
1776 postfix_attrs and non_std_attrs_seen_p. Increase size of
1777 typespec_kind bit-field.
1778 (c_warn_unused_attributes): New declaration.
1779 (parser_xref_tag): Update prototype.
1780 * c-decl.c (c_warn_unused_attributes): New function.
1781 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1782 ctsk_tagref_attrs. Handle attribute declarations.
1783 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1784 (grokdeclarator): Handle standard attributes.
1785 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1786 attributes to incomplete type reference.
1787 (xref_tag): Update call to parser_xref_tag.
1788 (declspecs_add_addrspace, declspecs_add_type)
1789 (declspecs_add_scspec, declspecs_add_attrs): Set
1790 non_std_attrs_seen_p.
1791 (finish_declspecs): Apply postfix standard attributes to type.
1792 * c-parser.c (c_token_starts_declspecs)
1793 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1794 (c_parser_next_tokens_start_declaration): Update comments.
1795 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1796 parser->tokens[2] to parser->tokens[1].
1797 (c_parser_nth_token_starts_std_attributes)
1798 (c_parser_std_attribute_specifier_sequence): New functions.
1799 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1800 attrs. All callers changed. Handle standard attributes.
1801 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1802 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1803 All callers changed.
1804 (c_parser_declspecs): Add arguments start_std_attr_ok and
1805 end_std_attr_ok. All callers changed. Handle standard
1806 attributes.
1807 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1808 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1809 (c_parser_compound_statement_nostart, c_parser_all_labels)
1810 (c_parser_label, c_parser_statement, c_parser_for_statement):
1811 Handle standard attributes.
1812 * c-parser.h (c_parser_declspecs): Update prototype.
1813 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1814 c_parser_declspecs.
1815
0c29cac4
ML
18162019-11-12 Martin Liska <mliska@suse.cz>
1817
1818 * gimple-parser.c: Do not include params.h.
1819
028d4092
ML
18202019-11-12 Martin Liska <mliska@suse.cz>
1821
1822 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1823 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1824 macro.
1825
62aee289
MR
18262019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1827 Frederik Harwath <frederik@codesourcery.com>
1828
1829 gcc/c/
1830 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1831 (c_parser_oacc_kernels_parallel): Rename function to...
1832 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1833 (c_parser_omp_construct): Update accordingly.
1834
1835
7cec9588
JJ
18362019-11-11 Jakub Jelinek <jakub@redhat.com>
1837
1838 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1839 without corresponding end declare target.
1840
f486280c
RS
18412019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1842
1843 * c-convert.c (convert): Only handle vector conversions if one of
1844 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1845 allows it.
1846 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1847 vectors satisfy gnu_vector_type_p.
1848 (build_unary_op): Only allow unary operators to be applied to
1849 vectors if they satisfy gnu_vector_type_p.
1850 (digest_init): Only allow by-element initialization of vectors
1851 if they satisfy gnu_vector_type_p.
1852 (really_start_incremental_init): Likewise.
1853 (push_init_level): Likewise.
1854 (pop_init_level): Likewise.
1855 (process_init_element): Likewise.
1856 (build_binary_op): Only allow binary operators to be applied to
1857 vectors if they satisfy gnu_vector_type_p.
1858
017c6491
JM
18592019-11-08 Joseph Myers <joseph@codesourcery.com>
1860
1861 * c-decl.c (grokparms): Convert () in a function definition to
1862 (void) for C2x.
1863 (store_parm_decls_oldstyle): Pedwarn for C2x.
1864 (store_parm_decls): Update comment about () not generating a
1865 prototype.
1866
c01bd174
JM
18672019-11-07 Joseph Myers <joseph@codesourcery.com>
1868
1869 * c-parser.c (c_parser_attribute_arguments): New function.
1870 Factored out of c_parser_gnu_attribute.
1871 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1872 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1873 (c_parser_std_attribute_specifier): New functions.
1874 (c_parser_transaction_attributes): Use
1875 c_parser_std_attribute_specifier.
1876
471c5330
JM
18772019-11-07 Joseph Myers <joseph@codesourcery.com>
1878
1879 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1880 lex_joined_string and translate_strings_p.
1881 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1882 c_lex_with_flags.
1883 (c_parser_string_literal): New function.
1884 (c_parser_static_assert_declaration_no_semi): Use
1885 c_parser_string_literal. Do not set lex_untranslated_string.
1886 (c_parser_asm_string_literal): Use c_parser_string_literal.
1887 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1888 (c_parser_gnu_attributes): Set and restore translate_strings_p
1889 instead of lex_untranslated_string.
1890 (c_parser_asm_statement): Do not set lex_untranslated_string.
1891 (c_parser_asm_operands): Likewise.
1892 (c_parser_has_attribute_expression): Set and restore
1893 translate_strings_p instead of lex_untranslated_string.
1894 (c_parser_postfix_expression): Use c_parser_string_literal.
1895 (pragma_lex): Likewise.
1896 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1897 (c_parse_file): Set translate_strings_p.
1898 * gimple-parser.c (c_parser_gimple_postfix_expression)
1899 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1900 * c-parser.c (c_parser_string_literal): Declare function.
1901
d0c464d2
JJ
19022019-11-02 Jakub Jelinek <jakub@redhat.com>
1903
1904 * c-parser.c (c_finish_omp_declare_variant): Use
1905 omp_get_context_selector instead of c_omp_get_context_selector.
1906
ac2cfa6c
RS
19072019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1908
1909 * c-tree.h (c_simulate_enum_decl): Declare.
1910 * c-decl.c (c_simulate_enum_decl): New function.
1911 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1912
74078538
RS
19132019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1914
1915 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1916 * c-decl.c (c_simulate_builtin_function_decl): New function.
1917 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1918 to the above.
1919
ad1539d5
MS
19202019-10-28 Martin Sebor <msebor@redhat.com>
1921
1922 PR c/66970
1923 * c-decl.c (names_builtin_p): Define a new function.
1924
cb73e4e7
RB
19252019-10-28 Richard Biener <rguenther@suse.de>
1926
1927 PR c/92249
1928 * gimple-parser.c (c_parser_parse_gimple_body): Make
1929 current_bb the entry block initially to easier recover
1930 from errors.
1931 (c_parser_gimple_compound_statement): Adjust.
1932
135df52c
JJ
19332019-10-24 Jakub Jelinek <jakub@redhat.com>
1934
1935 * c-parser.c (c_finish_omp_declare_variant): Use
1936 omp_context_selector_matches instead of
1937 c_omp_context_selector_matches.
1938 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1939 attribute in between declare target and end declare target
1940 pragmas.
1941
783bfe5e
JM
19422019-10-15 Joseph Myers <joseph@codesourcery.com>
1943
1944 * c-parser.c (c_parser_attribute_any_word): Rename to
1945 c_parser_gnu_attribute_any_word. All callers changed.
1946 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1947 callers changed.
1948 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1949 callers changed.
1950 (c_parser_declaration_or_fndef, c_parser_declspecs)
1951 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1952 (c_parser_struct_declaration, c_parser_declarator)
1953 (c_parser_gnu_attribute, c_parser_compound_statement)
1954 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1955 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1956 attribute-related syntax productions.
1957
56898e43
RS
19582019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1959
1960 * c-objc-common.c (useful_aka_type_p): Replace with...
1961 (get_aka_type): ...this new function. Given the original type,
1962 decide which aka type to print (if any). Only look through typedefs
1963 if user_facing_original_type_p.
1964 (print_type): Update accordingly.
1965
b9424661
JJ
19662019-10-14 Jakub Jelinek <jakub@redhat.com>
1967
1968 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1969 into int NESTED, if it is 2, diagnose missing commas in between
1970 clauses.
1971 (c_parser_omp_context_selector): Pass 2 as last argument to
1972 c_parser_omp_all_clauses.
1973
20de9568
JJ
19742019-10-12 Jakub Jelinek <jakub@redhat.com>
1975
1976 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1977 For simd properties, put them directly into TREE_VALUE.
1978 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1979 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1980 add "omp declare variant base" attribute rather than
1981 "omp declare variant".
1982
fe2bc27c
JM
19832019-10-11 Joseph Myers <joseph@codesourcery.com>
1984
1985 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1986
94e7f906
JJ
19872019-10-10 Jakub Jelinek <jakub@redhat.com>
1988
1989 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1990 true, terminate processing on closing paren and don't skip to end of
1991 pragma line.
1992 (c_parser_omp_declare_simd): Handle also declare variant.
1993 (omp_construct_selectors, omp_device_selectors,
1994 omp_implementation_selectors, omp_user_selectors): New variables.
1995 (c_parser_omp_context_selector,
1996 c_parser_omp_context_selector_specification,
1997 c_finish_omp_declare_variant): New functions.
1998 (c_finish_omp_declare_simd): Handle both declare simd and
1999 declare variant.
2000 (c_parser_omp_declare): Handle declare variant.
2001
93313b94
JM
20022019-10-02 Joseph Myers <joseph@codesourcery.com>
2003
2004 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2005 CPP_COLON tokens.
2006
55879815
RS
20072019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2008
2009 * c-objc-common.c (useful_aka_type_p): New function.
2010 (print_type): Use it to decide whether an aka type is worth printing.
2011
59bc434a
JJ
20122019-09-27 Jakub Jelinek <jakub@redhat.com>
2013
2014 PR c++/88203
2015 * c-parser.c (c_parser_predefined_identifier): New function.
2016 (c_parser_postfix_expression): Use it.
2017 (c_parser_omp_variable_list): Parse predefined identifiers.
2018 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2019 in shared and firstprivate clauses, even when they are predetermined
2020 shared.
2021
c6447c20
RS
20222019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2023
2024 * c-typeck.c (build_function_call_vec): Take the original function
2025 decl as an optional final parameter. Pass all built-in calls to
2026 check_builtin_function_arguments.
2027
522da4c2
EB
20282019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2029
2030 PR c/91815
2031 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2032 of identifiers in the external scope only for variables and functions.
2033
68e2c199
PK
20342019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2035
2036 PR c/78736
2037 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2038
22f8849d
IS
20392019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2040
2041 PR pch/61250
2042 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2043 after determining that the first token is not
2044 PRAGMA_GCC_PCH_PREPROCESS.
2045
db376f45
EB
20462019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2047
2048 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2049 FUNCTION_DECL to the right value in the presence of nested declarators.
2050
4d732405
RS
20512019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2052
2053 PR middle-end/91421
2054 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2055
cb1180d5
RS
20562019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2057
2058 PR middle-end/91421
2059 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2060 of a built_in_function.
2061 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2062
77eb117f
JJ
20632019-08-10 Jakub Jelinek <jakub@redhat.com>
2064
2065 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2066 (c_parser_omp_clause_device_type): New function.
2067 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2068 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2069 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2070 diagnostics for declare target with clauses nested in clause-less
2071 declare target declaration-definition-seq.
2072 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2073
2c3b8bad
JJ
20742019-08-09 Jakub Jelinek <jakub@redhat.com>
2075
bb522e2e
JJ
2076 * c-parser.c (check_no_duplicate_clause): Simplify using
2077 omp_find_clause.
2078 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2079 directive name modifiers.
2080 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2081
2c3b8bad
JJ
2082 PR c/91401
2083 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2084 check_no_duplicate_clause call. Comment it out, instead emit a
2085 warning for duplicate dist_schedule clauses.
2086
99769e7f
RS
20872019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2088
2089 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2090
8860d270
JJ
20912019-08-08 Jakub Jelinek <jakub@redhat.com>
2092
2093 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2094 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2095 instead of generic_head to track duplicates.
2096
398e3feb
JJ
20972019-08-07 Jakub Jelinek <jakub@redhat.com>
2098
2099 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2100 (c_parser_omp_clause_use_device_addr): New function.
2101 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2102 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2103 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2104 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2105 map or use_device_* clauses.
2106 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2107 in OpenMP, require pointer type rather than pointer or array type.
2108 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2109
a28351e7
JJ
21102019-07-31 Jakub Jelinek <jakub@redhat.com>
2111
2112 PR c/91192
2113 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2114 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2115 case.
2116
6343b6bf
ML
21172019-07-25 Martin Liska <mliska@suse.cz>
2118 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2119
2120 PR c++/23383
2121 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2122
cb50701e
ML
21232019-07-25 Martin Liska <mliska@suse.cz>
2124
2125 * c-decl.c (merge_decls): Use new macros
2126 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2127
62e3e66f
RB
21282019-07-23 Richard Biener <rguenther@suse.de>
2129
2130 PR tree-optimization/83518
2131 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2132 a CFG also rebuild cgraph edges.
2133
554a530f
JJ
21342019-07-20 Jakub Jelinek <jakub@redhat.com>
2135
2136 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2137 (c_parser_omp_clause_bind): New function.
2138 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2139 (OMP_LOOP_CLAUSE_MASK): Define.
2140 (c_parser_omp_loop): New function.
2141 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2142 loop combined with parallel or teams.
2143 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2144 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2145
d119bf79
RS
21462019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2147
2148 PR c/53633
2149 * c-decl.c (finish_function): Check targetm.warn_func_return
2150 before issuing a -Wreturn-type warning.
2151
ab20d992 21522019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2153
2154 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2155 (c_parser_compound_statement): Call it.
2156
1fdd6f04
JJ
21572019-07-12 Jakub Jelinek <jakub@redhat.com>
2158
2159 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2160 (c_parser_omp_clause_order): New function.
2161 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2162 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2163 PRAGMA_OMP_CLAUSE_ORDER.
2164 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2165
8389386c
RB
21662019-07-10 Richard Biener <rguenther@suse.de>
2167
2168 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2169 _Literal (int *) &x for address literals.
2170
99b1c316
MS
21712019-07-09 Martin Sebor <msebor@redhat.com>
2172
2173 PR c++/61339
2174 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2175 to class.
2176 (field_decl_cmp): Same.
2177 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2178 * c-tree.h: Same.
2179 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2180
6c1dae73
MS
21812019-07-09 Martin Sebor <msebor@redhat.com>
2182
2183 PR c++/61339
2184 * c-decl.c: Change class-key from class to struct and vice versa
2185 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2186 * gimple-parser.c: Same.
2187
69b5279e
RB
21882019-07-01 Richard Biener <rguenther@suse.de>
2189
2190 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2191 _Literal (char *) &"foo" for address literals pointing to
2192 STRING_CSTs.
2193
ab20d992
JJ
21942019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2195
2196 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2197 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2198 C incompatibility if alternate "__intN__" form is used.
2199
1e3d475e
MS
22002019-06-24 Martin Sebor <msebor@redhat.com>
2201
2202 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2203
bf38f7e9
JJ
22042019-06-10 Jakub Jelinek <jakub@redhat.com>
2205
2206 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2207 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2208 (c_parser_omp_scan_loop_body): New function.
2209 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2210 inscan reduction clauses.
2211 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2212 non-inscan reductions on the same construct, or inscan reductions with
2213 ordered or schedule clauses, or inscan array reductions.
2214
65985d78
MS
22152019-06-05 Martin Sebor <msebor@redhat.com>
2216
2217 PR c/90737
2218 * c-typeck.c (c_finish_return): Only consider functions returning
2219 pointers as candidates for -Wreturn-local-addr.
2220
0ecf545c
MS
22212019-06-05 Martin Sebor <msebor@redhat.com>
2222
2223 * c-decl.c (start_decl): Adjust quoting and hyphenation
2224 in diagnostics.
2225 (finish_decl): Same.
2226 (finish_enum): Same.
2227 (start_function): Same.
2228 (declspecs_add_type): Same.
2229 * c-parser.c (warn_for_abs): Same.
2230 * c-typeck.c (build_binary_op): Same.
2231
e03436e7
TS
22322019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2233
b48f44bf
TS
2234 PR c/89433
2235 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2236 marked with an OpenACC 'routine' directive.
2237
5bf04509
TS
2238 PR c/89433
2239 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2240 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2241
e03436e7
TS
2242 PR c/89433
2243 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2244 clauses from "omp declare target" attribute.
2245
a9c697b8
MS
22462019-05-16 Martin Sebor <msebor@redhat.com>
2247
ab20d992
JJ
2248 * c-decl.c (start_decl): Quote keywords, operators, and
2249 types in diagnostics.
2250 (finish_decl): Same.
2251 * c-parser.c (c_parser_asm_statement): Same.
2252 (c_parser_conditional_expression): Same.
2253 (c_parser_transaction_cancel): Same.
2254 * c-typeck.c (c_common_type): Same.
2255 (build_conditional_expr): Same.
2256 (digest_init): Same.
2257 (process_init_element): Same.
2258 (build_binary_op): Same.
a9c697b8 2259
c4499192
RB
22602019-05-17 Richard Biener <rguenther@suse.de>
2261
2262 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2263 (c_parser_gimple_unary_expression): Likewise.
2264 (c_parser_gimple_parentized_ternary_expression): New function.
2265
adfe6e4b
RB
22662019-05-16 Richard Biener <rguenther@suse.de>
2267
2268 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2269 (c_parser_gimple_unary_expression): Likewise.
2270
186dabf2
RB
22712019-05-15 Richard Biener <rguenther@suse.de>
2272
2273 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2274 __BIT_FIELD_REF.
2275
1158c5b4
RB
22762019-05-14 Richard Biener <rguenther@suse.de>
2277
2278 * gimple-parser.c (c_parser_gimple_statement): Remove
2279 questionable auto-promotion to VIEW_CONVERT_EXPR.
2280 (c_parser_gimple_typespec): Split out from __MEM parsing.
2281 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2282 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2283 as __VIEW_CONVERT with -gimple.
2284
fd4485aa
ML
22852019-05-09 Martin Liska <mliska@suse.cz>
2286
2287 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2288 __MAX.
2289 (c_parser_gimple_unary_expression): Parse also binary expression
2290 __MIN and __MAX.
2291 (c_parser_gimple_parentized_binary_expression): New function.
2292
d276406a
ML
22932019-05-09 Martin Liska <mliska@suse.cz>
2294
2295 * gimple-parser.c (struct gimple_parser): Add probability.
2296 for gimple_parser_edge.
2297 (gimple_parser::push_edge): Add new argument probability.
2298 (c_parser_gimple_parse_bb_spec): Parse also probability
2299 if present.
2300 (c_parser_parse_gimple_body): Set edge probability.
2301 (c_parser_gimple_compound_statement): Consume token
2302 before calling c_parser_gimple_goto_stmt.
2303 Parse BB counts.
2304 (c_parser_gimple_statement): Pass new argument.
2305 (c_parser_gimple_goto_stmt): Likewise.
2306 (c_parser_gimple_if_stmt): Likewise.
2307 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2308 * c-parser.c (c_parser_declaration_or_fndef): Pass
2309 hot_bb_threshold argument.
2310 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2311 field.
2312 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2313
f179b64e
JJ
23142019-04-26 Jakub Jelinek <jakub@redhat.com>
2315
2316 PR debug/90197
2317 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2318 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2319 (c_parser_do_statement): Likewise.
2320 (c_parser_for_statement): Likewise. Formatting fixes.
2321 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2322 emit DEBUG_BEGIN_STMTs if needed.
2323
e7178413
JJ
23242019-04-19 Jakub Jelinek <jakub@redhat.com>
2325
c280b7ee
JJ
2326 PR c/89888
2327 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2328 (c_start_case): Don't clear it.
2329 (do_case): Adjust c_add_case_label caller.
2330 (c_finish_case): Adjust c_do_switch_warnings caller.
2331
e7178413
JJ
2332 PR c++/90108
2333 * c-decl.c (merge_decls): If remove is main variant and
2334 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2335 variant that has newdecl as TYPE_NAME if any.
2336
60a2c645
JJ
23372019-04-12 Jakub Jelinek <jakub@redhat.com>
2338
2339 PR c/89933
2340 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2341 don't try to remove it from the variant list, but instead assert
2342 it has no variants.
2343
2a82beaa
RB
23442019-04-01 Richard Biener <rguenther@suse.de>
2345
2346 PR c/71598
2347 * c-tree.h (c_get_alias_set): Declare.
2348 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2349 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2350 as the underlying integer type.
2351
bec1da64
MS
23522019-03-19 Martin Sebor <msebor@redhat.com>
2353
2354 PR tree-optimization/89688
2355 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2356 kinds of initializers.
2357
855cd9b1
JJ
23582019-03-19 Jakub Jelinek <jakub@redhat.com>
2359
2360 PR c/89734
2361 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2362 return type even if quals_used is 0. Formatting fixes.
2363
baa09dc5
RB
23642019-03-14 Richard Biener <rguenther@suse.de>
2365
2366 * c-tree.h (enum c_declspec_il): New.
2367 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2368 enum bitfield.
2369 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2370 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2371 (c_parser_declspecs): Adjust.
2372 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2373 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2374 and bitmap.h.
2375 (struct gimple_parser): New.
2376 (gimple_parser::push_edge): New method.
2377 (c_parser_gimple_parse_bb_spec): New helper.
2378 (c_parser_parse_gimple_body): Get start pass and IL specification.
2379 Initialize SSA and CFG.
2380 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2381 Build a gimple_parser parsing state and pass it along.
2382 (c_parser_gimple_statement): Change intermittend __PHI internal
2383 function argument for the edge.
2384 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2385 (c_parser_gimple_goto_stmt): Record edges to build.
2386 (c_parser_gimple_if_stmt): Likewise.
2387 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2388 (c_parser_gimple_or_rtl_pass_list): Likewise.
2389
a3f9f006
ML
23902019-03-11 Martin Liska <mliska@suse.cz>
2391
2392 * c-decl.c (check_for_loop_decls): Wrap an option name
2393 in a string format message and fix GNU coding style.
2394 * c-parser.c (c_parser_declspecs): Likewise.
2395
1db01ff9
JJ
23962019-03-08 Jakub Jelinek <jakub@redhat.com>
2397
2398 PR tree-optimization/89550
2399 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2400 returned true.
2401 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2402 or warning returned true.
2403
66dcb747
JJ
24042019-02-28 Jakub Jelinek <jakub@redhat.com>
2405
2406 PR c/89525
2407 * c-typeck.c (convert_arguments): Call inform_declaration only if
2408 the previous warning_at call returned true.
2409
2263c9f2
TS
24102019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2411
2412 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2413 parameter. Adjust all users.
2414 (c_parser_oacc_simple_clause): Replace parser with loc formal
2415 parameter. Adjust all users.
2416
ab20d992 24172019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2418
2419 PR c/87924
2420 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2421 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2422
5f88ba10
JJ
24232019-02-15 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR c/89340
2426 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2427 before c_decl_attributes rather than after it.
2428
cfc30fd1
JJ
24292019-02-06 Jakub Jelinek <jakub@redhat.com>
2430
2431 PR c/89211
2432 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2433 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2434 instead of 3 nested ifs.
2435
fbe83e6b
JM
24362019-02-06 Joseph Myers <joseph@codesourcery.com>
2437
2438 PR c/88584
2439 * c-decl.c (finish_decl): Do not complete array types for arrays
2440 with external linkage not at file scope.
2441
f461f938
RB
24422019-02-05 Richard Biener <rguenther@suse.de>
2443
2444 PR c/88606
2445 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2446 all type variants when not supported.
2447
fe509359
JJ
24482019-01-30 Jakub Jelinek <jakub@redhat.com>
2449
2450 PR c/89061
2451 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2452 * c-decl.c (decl_jump_unsafe): Return false for
2453 C_DECL_COMPOUND_LITERAL_P decls.
2454 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2455
6a335b96
JJ
24562019-01-29 Jakub Jelinek <jakub@redhat.com>
2457
f4b7e754
JJ
2458 PR c/89045
2459 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2460 scope.
2461
6a335b96
JJ
2462 PR c/86125
2463 * c-decl.c (last_fileptr_type): Remove.
2464 (last_structptr_types): New variable.
2465 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2466 {old,new}rettype instead of the types themselves. Assert
2467 last_structptr_types array has the same number of elements
2468 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2469 argument oldtype and newtype. Instead of handling
2470 just fileptr_type_node specially, handle all builtin_structptr_types
2471 pointer nodes. Formatting fix.
2472
d8b5a1a0
MS
24732019-01-24 Martin Sebor <msebor@redhat.com>
2474
2475 PR c/86125
2476 PR c/88886
2477 PR middle-end/86308
2478 * c-decl.c (match_builtin_function_types): Add arguments.
2479 (diagnose_mismatched_decls): Diagnose mismatched declarations
2480 of built-ins more strictly.
2481
e21c4491
JJ
24822019-01-24 Jakub Jelinek <jakub@redhat.com>
2483
2484 PR c++/88976
2485 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2486 on #pragma omp cancel with different modifiers.
2487
420183d9
L
24882019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2489
2490 PR c/51628
2491 PR c/88664
2492 * c-typeck.c (convert_for_assignment): Upate the
2493 warn_for_address_or_pointer_of_packed_member call.
2494
17ad43dd
TH
24952019-01-16 Tom Honermann <tom@honermann.net>
2496 Jason Merrill <jason@redhat.com>
2497
2498 * c-typeck.c (digest_init): Revised the error message produced for
2499 ill-formed cases of array initialization with a string literal.
2500 (error_init): Make variadic.
2501
5f07d78a
JJ
25022019-01-12 Jakub Jelinek <jakub@redhat.com>
2503
2504 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2505
c4581bbf
JJ
25062019-01-07 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR c/88701
2509 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2510 if current_function_decl is non-NULL.
2511
65c5b1eb
JM
25122019-01-07 Joseph Myers <joseph@codesourcery.com>
2513
2514 PR c/88720
2515 PR c/88726
2516 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2517 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2518 functions declared but never defined only for external scope, not
2519 for other scopes.
2520
d8fcab68
JJ
25212019-01-07 Jakub Jelinek <jakub@redhat.com>
2522
2523 PR c++/85052
2524 * c-parser.c (c_parser_postfix_expression): Parse
2525 __builtin_convertvector.
2526
a5544970
JJ
25272019-01-01 Jakub Jelinek <jakub@redhat.com>
2528
2529 Update copyright years.
2530
da77eace
L
25312018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2532
2533 PR c/51628
2534 * c-typeck.c (convert_for_assignment): Call
2535 warn_for_address_or_pointer_of_packed_member.
2536
1edf8866
SB
25372018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2538
2539 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2540 a more specific error message (instead of just falling through).
2541
db4fd626
SB
25422018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2543
2544 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2545 asm qualifier is first seen; use that to give nicer "duplicate asm
2546 qualifier" messages. Delete 'quals" variable, instead pass the
2547 "is_volatile_ flag to build_asm_stmt directly.
2548 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2549 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2550
9c9cfcbb
SB
25512018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2552
2553 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2554 "done" boolean variable.
2555
a14feb3c
DM
25562018-12-19 David Malcolm <dmalcolm@redhat.com>
2557
2558 PR c++/87504
2559 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2560 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2561 (build_binary_op): Use struct op_location_t and
2562 class binary_op_rich_location.
2563
6d939173
JJ
25642018-12-11 Jakub Jelinek <jakub@redhat.com>
2565
2566 PR sanitizer/88426
2567 * c-convert.c (convert): Call c_fully_fold before calling
2568 ubsan_instrument_float_cast.
2569
b7055028
SB
25702018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2571
2572 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2573 setting "quals".
2574
5b76e75f
SB
25752018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2576
2577 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2578 after asm. Pass a flag for it to build_asm_expr.
2579 * c-tree.h (build_asm_expr): Update declaration.
2580 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2581 set ASM_INLINE_P.
2582
30bd42b9
SB
25832018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2584
2585 PR inline-asm/55681
2586 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2587 combination of volatile and goto, in any order, without repetitions.
2588
9df6c0e4
JB
25892018-12-04 James Norris <jnorris@codesourcery.com>
2590 Cesar Philippidis <cesar@codesourcery.com>
2591 Julian Brown <julian@codesourcery.com>
2592
2593 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2594 code.
2595
f44697b7
RB
25962018-11-30 Richard Biener <rguenther@suse.de>
2597
2598 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2599 _Literal (type) { ... } as empty aggregate or vector constructor.
2600
550dfbdc
MS
26012018-11-29 Martin Sebor <msebor@redhat.com>
2602
2603 PR c/88091
2604 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2605 (convert_arguments): Add comments. Pass additional argument to
2606 the function above.
2607
673670da
MS
26082018-11-29 Martin Sebor <msebor@redhat.com>
2609
2610 PR c/88172
2611 PR testsuite/88208
2612 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2613
db1d09b0
MS
26142018-11-23 Martin Sebor <msebor@redhat.com>
2615
2616 PR testsuite/88098
2617 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2618 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2619
98f08eb8
MS
26202018-11-20 Martin Sebor <msebor@redhat.com>
2621
2622 * c-parser.c (c_parser_has_attribute_expression): New function.
2623 (c_parser_attribute): New function.
2624 (c_parser_attributes): Move code into c_parser_attribute.
2625 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2626
cd5da983
MS
26272018-11-15 Martin Sebor <msebor@redhat.com>
2628
2629 PR c/83656
2630 * c-decl.c (header_for_builtin_fn): Declare.
2631 (diagnose_mismatched_decls): Diagnose declarations of built-in
2632 functions without a prototype.
2633 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2634 (convert_argument): Same.
2635 (convert_arguments): Factor code out into convert_argument.
2636 Detect mismatches between built-in formal arguments in calls
2637 to built-in without prototype.
2638 (build_conditional_expr): Same.
2639 (type_or_builtin_type): New function.
2640 (convert_for_assignment): Add argument. Conditionally issue
2641 warnings instead of errors for mismatches.
2642
620e594b
DM
26432018-11-13 David Malcolm <dmalcolm@redhat.com>
2644
2645 * c-decl.c: Replace "source_location" with "location_t".
2646 * c-tree.h: Likewise.
2647 * c-typeck.c: Likewise.
2648 * gimple-parser.c: Likewise.
2649
3179ebae
JJ
26502018-11-09 Jakub Jelinek <jakub@redhat.com>
2651
81a227c6
JJ
2652 * c-parser.c (c_parser_omp_clause_final): Use
2653 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2654 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2655 parsing instead of c_parser_paren_condition.
2656 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2657 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2658 c_fully_fold instead of c_parser_condition.
2659 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2660 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2661 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2662 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2663 c_parser_expr_no_commas instead of c_parser_expression.
2664
98c91c56
JJ
2665 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2666 reduction clause with inscan modifier.
2667
3179ebae
JJ
2668 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2669 clauses other than atomic_default_mem_order.
2670
28567c40
JJ
26712018-11-08 Jakub Jelinek <jakub@redhat.com>
2672
2673 * c-parser.c: Include memmode.h.
2674 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2675 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2676 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2677 task_reduction clauses.
2678 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2679 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2680 section, or lvalue assignment expression.
2681 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2682 (c_parser_omp_clause_lastprivate): Parse optional
2683 conditional: modifier.
2684 (c_parser_omp_clause_hint): Require constant integer expression rather
2685 than just integer expression.
2686 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2687 clause.
2688 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2689 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2690 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2691 functions.
2692 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2693 iterators. Parse mutexinoutset and depobj kinds.
2694 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2695 callers.
2696 (c_parser_omp_all_clauses): Likewise. Handle
2697 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2698 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2699 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2700 default memory order from requires directive if any. Adjust
2701 c_finish_omp_atomic caller.
2702 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2703 (c_parser_omp_flush): Parse flush with memory-order-clause.
2704 (c_parser_omp_for_loop): Allow NE_EXPR even in
2705 OpenMP loops, adjust c_finish_omp_for caller.
2706 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2707 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2708 Allow to be called while parsing combined parallel master.
2709 Parse combined master taskloop{, simd}.
2710 (c_parser_omp_parallel): Parse combined
2711 parallel master{, taskloop{, simd}} constructs.
2712 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2713 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2714 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2715 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2716 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2717 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2718 around teams body. Use SET_EXPR_LOCATION.
2719 (c_parser_omp_target_data): Allow target data
2720 with only use_device_ptr clauses.
2721 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2722 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2723 (c_parser_omp_requires): New function.
2724 (c_finish_taskloop_clauses): New function.
2725 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2726 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2727 declaration. Disallow in_reduction clause when combined with parallel
2728 master.
2729 (c_parser_omp_construct): Adjust c_parser_omp_master and
2730 c_parser_omp_taskgroup callers.
2731 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2732 other than cancel.
2733 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2734 like OMP_CLAUSE_REDUCTION.
2735 (handle_omp_array_sections): Likewise. Call save_expr on array
2736 reductions before calling build_index_type. Handle depend clauses
2737 with iterators.
2738 (struct c_find_omp_var_s): New type.
2739 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2740 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2741 with static, runtime or auto schedule kinds. Call save_expr for whole
2742 array reduction sizes. Diagnose reductions with zero sized elements
2743 or variable length structures. Diagnose nogroup clause used with
2744 reduction clause(s). Handle depend clause with
2745 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2746 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2747 some different type for other kinds. Use build_unary_op with
2748 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2749 Handle depend clauses with iterators. Remove no longer needed special
2750 case that predetermined const qualified vars may be specified in
2751 firstprivate clause. Complain if const qualified vars are mentioned
2752 in data-sharing clauses other than firstprivate or shared. Use
2753 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2754 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2755 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2756 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2757
7e2de6df
DM
27582018-10-29 David Malcolm <dmalcolm@redhat.com>
2759
2760 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2761 logic for change to name_hint::operator bool.
2762 (undeclared_variable): Likewise.
2763 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2764 (c_parser_parameter_declaration): Likewise.
2765
9f936c86
JM
27662018-10-17 Joseph Myers <joseph@codesourcery.com>
2767
2768 * c-errors.c (pedwarn_c11): New function.
2769 * c-parser.c (disable_extension_diagnostics): Save
2770 warn_c11_c2x_compat and set it to 0.
2771 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2772 (c_parser_static_assert_declaration_no_semi): Handle
2773 _Static_assert without string constant.
2774 * c-tree.h (pedwarn_c11): New prototype.
2775
033eb567
DM
27762018-10-17 David Malcolm <dmalcolm@redhat.com>
2777
2778 * Make-lang.in (selftest-c): New.
2779 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2780 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2781 from gcc/Makefile.in.
2782
0edf3afe
RB
27832018-10-02 Richard Biener <rguenther@suse.de>
2784
2785 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2786
8313a764
JM
27872018-09-26 Joseph Myers <joseph@codesourcery.com>
2788
2789 PR c/87390
2790 * c-typeck.c (build_binary_op): Use excess precision for
2791 comparisons of integers and floating-point for C11 and later.
2792
ce6f0888
MJ
27932018-09-26 Martin Jambor <mjambor@suse.cz>
2794
2795 PR c/87347
2796 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2797 comment.
ce6f0888 2798
9c4a4b3c
DM
27992018-09-17 David Malcolm <dmalcolm@redhat.com>
2800
2801 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2802 Update for new param.
2803 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2804 Likewise.
2805
80c6d1f4
MJ
28062018-09-17 Martin Jambor <mjambor@suse.cz>
2807
2808 PR c/63886
2809 * c-parser.c: (warn_for_abs): New function.
2810 (c_parser_postfix_expression_after_primary): Call it.
2811
4a426e36
BE
28122018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2813
2814 * c-typeck.c (digest_init): Shorten overlength strings.
2815
6d900107
BE
28162018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2817
2818 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2819
b5764229
BE
28202018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2821
2822 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2823 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2824
22eea6b2
AM
28252018-08-30 Alexander Monakov <amonakov@ispras.ru>
2826
2827 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2828 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2829
85204e23
DM
28302018-08-27 David Malcolm <dmalcolm@redhat.com>
2831
2832 PR 87091
2833 * c-decl.c (implicitly_declare): Update call to
2834 maybe_add_include_fixit to suggest overriding the location, as it
2835 is for a note.
2836 * c-objc-common.c (c_tree_printer): Update for conversion of
2837 show_caret_p to a tri-state.
2838
3d78e008
ML
28392018-08-27 Martin Liska <mliska@suse.cz>
2840
2841 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2842 fndecl_built_in_p and remove check for FUNCTION_DECL if
2843 possible.
3d78e008
ML
2844 (diagnose_mismatched_decls): Likewise.
2845 (merge_decls): Likewise.
2846 (warn_if_shadowing): Likewise.
2847 (pushdecl): Likewise.
2848 (implicitly_declare): Likewise.
2849 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2850 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2851 * c-typeck.c (build_function_call_vec): Likewise.
2852 (convert_arguments): Likewise.
2853
097f82ec
DM
28542018-08-20 David Malcolm <dmalcolm@redhat.com>
2855
2856 PR other/84889
2857 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2858 (diagnose_mismatched_decls): Likewise, in various places.
2859 (warn_if_shadowing): Likewise.
2860 (implicit_decl_warning): Likewise.
2861 (implicitly_declare): Likewise.
2862 (undeclared_variable): Likewise.
2863 (declare_label): Likewise.
2864 (grokdeclarator): Likewise.
2865 (start_function): Likewise.
2866 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2867 (c_parser_parameter_declaration): Likewise.
2868 (c_parser_binary_expression): Likewise.
2869 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2870 (parser_build_binary_op): Likewise.
2871 (build_unary_op): Likewise.
2872 (error_init): Likewise.
2873 (pedwarn_init): Likewise.
2874 (warning_init): Likewise.
2875 (convert_for_assignment): Likewise.
2876
96e6ae57
DM
28772018-08-15 David Malcolm <dmalcolm@redhat.com>
2878
2879 * c-objc-common.c: Include "gcc-rich-location.h".
2880 (c_tree_printer): Move implemenation of '%T' to...
2881 (print_type): ...this new function.
2882 (range_label_for_type_mismatch::get_text): New function.
2883 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2884 range for the various ic_argpass cases.
2885 (class maybe_range_label_for_tree_type_mismatch): New class.
2886 (build_binary_op): Use it when calling binary_op_error.
2887
0cd020ae 28882018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2889
0cd020ae
PK
2890 * c-decl.c (start_decl): Do not warn if variables is named as main
2891 and is a local variable.
2892
72733314
IS
28932018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2894
2895 PR c/19315
2896 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2897 objects of unknown size.
2898
23aa9f7c
MS
28992018-08-13 Martin Sebor <msebor@redhat.com>
2900
2901 PR tree-optimization/71625
2902 * c-parser.c (c_parser_declaration_or_fndef): Call
2903 braced_list_to_string.
2904
e5e7e50d
BH
29052018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2906
2907 PR c/86690
2908 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2909 errors.
2910
8a45b051
MS
29112018-08-01 Martin Sebor <msebor@redhat.com>
2912
2913 PR tree-optimization/86650
2914 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2915 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2916
5922dcb5
JJ
29172018-08-01 Jakub Jelinek <jakub@redhat.com>
2918
2919 PR c/85704
2920 * c-typeck.c (init_field_decl_cmp): New function.
2921 (output_pending_init_elements): Use it for field comparisons
2922 instead of pure bit_position comparisons.
2923
9b452033
JJ
29242018-07-12 Jakub Jelinek <jakub@redhat.com>
2925
2926 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2927 type here, instead add "omp declare target implicit" attribute.
2928 (finish_decl): Diagnose vars without mappable type here.
2929
ab20d992
JJ
29302018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2931 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2932 Cesar Philippidis <cesar@codesourcery.com>
2933
2934 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2935 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2936 to their non-present_or_* counterparts. Make 'self' an alias to
2937 PRAGMA_OACC_CLAUSE_HOST.
2938 (c_parser_oacc_data_clause): Update GOMP mappings for
2939 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2940 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2941 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2942 Remove support for present_or_* clauses.
2943 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2944 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2945 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2946 (OACC_DATA_CLAUSE_MASK): Likewise.
2947 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2948 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2949 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2950 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2951 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2952
e197e64e
KV
29532018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2954
2955 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2956 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2957 (c_parser_gimple_unary_expression): Likewise.
2958
487f2f61
JJ
29592018-06-15 Jakub Jelinek <jakub@redhat.com>
2960
2961 PR c/86093
2962 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2963 before doing POINTER_DIFF_EXPR.
2964
e4d44a37
MP
29652018-06-07 Marek Polacek <polacek@redhat.com>
2966
2967 PR c/85318
2968 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2969 for loop initial declarations.
2970
b67b9225
DP
29712018-05-30 David Pagan <dave.pagan@oracle.com>
2972
2973 PR c/55976
2974 * c-decl.c (grokdeclarator): Update check for return type warnings.
2975 (start_function): Likewise.
2976 (finish_function): Likewise.
2977 * c-typeck.c (c_finish_return): Update check for return type warnings.
2978 Pass OPT_Wreturn_type to pedwarn when appropriate.
2979
c566cc9f
RS
29802018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2981
2982 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2983 __FMA_EXPR handlng.
2984
e4f81565
RS
29852018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2986
2987 * gimple-parser.c: Include internal-fn.h.
2988 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2989 (c_parser_gimple_call_internal): New function.
2990 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2991 Fix typos in comment.
2992
79e7b1fe
JJ
29932018-05-10 Jakub Jelinek <jakub@redhat.com>
2994
2995 PR c++/85662
2996 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2997 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2998 fold_convert_loc.
2999 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3000 fold_offsetof_1, pass argtype as TYPE to it and drop the
3001 fold_convert_loc.
3002
f7584c81
DP
30032018-05-02 David Pagan <dave.pagan@oracle.com>
3004
3005 PR c/30552
3006 * c-decl.c (old_style_parameter_scope): New function.
3007 * c-parser.c (c_parser_postfix_expression): Check for statement
3008 expressions in old-style function parameter list declarations.
3009 * c-parser.h (old_style_parameter_scope): New extern declaration.
3010
b33a0cb3
JJ
30112018-04-25 Jakub Jelinek <jakub@redhat.com>
3012
3013 PR sanitizer/84307
3014 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3015 it is not TREE_STATIC.
3016 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3017 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3018 its COMPOUND_LITERAL_EXPR_DECL.
3019
c5c5822a
JM
30202018-03-21 Joseph Myers <joseph@codesourcery.com>
3021
3022 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3023 where all functions return the same _FloatN or _FloatNx type,
3024 treat integer types as _Float64 instead of double.
3025
aa1c9429
JJ
30262018-03-21 Jakub Jelinek <jakub@redhat.com>
3027
3028 PR c/84999
3029 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3030 building vector comparison, diagnose it and return error_mark_node.
3031
9bb45a95
JJ
30322018-03-15 Jakub Jelinek <jakub@redhat.com>
3033
3034 PR c/84853
3035 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3036 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3037 INTEGER_TYPE element type.
3038
ada6bad9
DP
30392018-03-13 David Pagan <dave.pagan@oracle.com>
3040
3041 PR c/46921
3042 * c-typeck.c (output_init_element): Ensure field initializer
3043 expression is always evaluated if there are side effects.
3044
849bbdb9
JJ
30452018-03-06 Jakub Jelinek <jakub@redhat.com>
3046
3047 PR c/84721
3048 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3049 !building_stmt_list_p ().
3050
d74641bd
RS
30512018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3052
3053 PR c/84305
3054 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3055 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3056 and include the BIND_EXPR in the list of things that need to be
3057 pre-evaluated.
3058
0444aa9c
NS
30592018-02-09 Nathan Sidwell <nathan@acm.org>
3060
3061 PR c/84293
3062 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3063 to strict_aliasing_warning.
3064
7c30b12a
PC
30652018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3066
3067 * c-typeck.c (really_start_incremental_init, push_init_level,
3068 set_nonincremental_init, output_init_element, process_init_element):
3069 Use DECL_UNNAMED_BIT_FIELD.
3070
2be4dfcb
MP
30712018-01-31 Marek Polacek <polacek@redhat.com>
3072
3073 PR c/81779
3074 * c-parser.c (c_parser_compound_statement_nostart): Call
3075 expansion_point_location_if_in_system_header.
3076
bb9869d5
DM
30772018-01-17 David Malcolm <dmalcolm@redhat.com>
3078
3079 PR c++/83814
3080 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3081 the C part.
3082
b4923738
JJ
30832018-01-13 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR c/83801
3086 * c-tree.h (decl_constant_value_1): Add a bool argument.
3087 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3088 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3089 (decl_constant_value): Adjust caller.
3090 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3091 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3092 decl_constant_value returns initializer that has BLKmode or
3093 array type.
3094 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3095
928686b1
RS
30962018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3097 Alan Hayward <alan.hayward@arm.com>
3098 David Sherwood <david.sherwood@arm.com>
3099
3100 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3101 TYPE_VECTOR_SUBPARTS.
3102
85ec4feb
JJ
31032018-01-03 Jakub Jelinek <jakub@redhat.com>
3104
3105 Update copyright years.
3106
913884f7
JJ
31072018-01-01 Jakub Jelinek <jakub@redhat.com>
3108
3109 PR c/83595
3110 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3111 c_parser_conditional_expression, c_parser_cast_expression,
3112 c_parser_sizeof_expression, c_parser_alignof_expression,
3113 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3114 c_parser_transaction_expression): Use set_error () method instead
3115 of setting value member to error_mark_node.
3116
c6cfa2bf
MM
31172017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3118
3119 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3120 and _Float<N>X built-in functions.
3121
11d29d63
JJ
31222017-12-22 Jakub Jelinek <jakub@redhat.com>
3123
14ec014e
JJ
3124 PR debug/83550
3125 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3126 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3127 incomplete vars rather than after it.
3128
11d29d63
JJ
3129 PR debug/83547
3130 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3131 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3132 and consider empty ones if there are no other stmts. For
3133 -Wunused-value walk all statements before the one only followed by
3134 DEBUG_BEGIN_STMTs.
3135
170a8bd6 31362017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3137 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3138
3139 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3140 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3141 (c_parser_do_statement): Likewise.
3142 (c_parser_for_statement): Likewise.
3143 (c_parser_statement_after_labels): Adjust calls to above.
3144 (c_parse_pragma_ivdep): New static function.
3145 (c_parser_pragma_unroll): Likewise.
3146 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3147 <PRAGMA_UNROLL>: New case.
3148
01512446
JJ
31492017-12-19 Jakub Jelinek <jakub@redhat.com>
3150
3151 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3152 perform_integral_promotions, digest_init): Replace Yoda conditions
3153 with typical order conditions.
3154 * c-decl.c (check_bitfield_type_and_width): Likewise.
3155
c65e18d3
BE
31562017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3157
3158 * c-typeck.c (c_safe_arg_type_equiv_p,
3159 c_safe_function_type_cast_p): New function.
3160 (build_c_cast): Implement -Wcast-function-type.
3161
b7280579
RB
31622017-12-14 Richard Biener <rguenther@suse.de>
3163
3164 PR c/83415
3165 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3166 like REALPART_EXPR for the behavior of whether its operand
3167 is an lvalue.
3168
49e6a6c0
MP
31692017-12-12 Marek Polacek <polacek@redhat.com>
3170
3171 PR c/82679
3172 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3173
ab20d992 31742017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3175
3176 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3177 * c-parser.c (add_debug_begin_stmt): New.
3178 (c_parser_declaration_or_fndef): Call it.
3179 (c_parser_compound_statement_nostart): Likewise.
3180 (c_parser_statement_after_labels): Likewise.
3181 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3182
4b2b493f
JM
31832017-12-07 Joseph Myers <joseph@codesourcery.com>
3184
3185 * c-decl.c (build_compound_literal): Add parameter alignas_align
3186 and set alignment of decl if nonzero.
3187 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3188 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3189 qualifier.
3190 (c_parser_struct_declaration): Update syntax comment.
3191 (c_parser_type_name): Add alignas_ok argument and pass it to
3192 c_parser_declspecs.
3193 (c_parser_cast_expression): Pass true to c_parser_type_name and
3194 give error if a cast used an _Alignas specifier.
3195 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3196 give error if sizeof (type-name) used an _Alignas specifier.
3197 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3198 give error if _Alignof (type-name) used an _Alignas specifier.
3199 (c_parser_postfix_expression_after_paren_type): Check specified
3200 alignment for a compound literal and pass it to
3201 build_compound_literal.
3202 * c-parser.h (c_parser_type_name): Update prototype.
3203 * c-tree.h (build_compound_literal): Update prototype.
3204
5d9ae53d
MS
32052017-12-07 Martin Sebor <msebor@redhat.com>
3206
3207 PR c/81544
3208 * c-decl.c (c_decl_attributes): Look up existing declaration and
3209 pass it to decl_attributes.
3210
c79144f8
DM
32112017-12-06 David Malcolm <dmalcolm@redhat.com>
3212
3213 PR c/83236
3214 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3215 reserved for use by the implementation.
3216
613bc14f
DM
32172017-12-06 David Malcolm <dmalcolm@redhat.com>
3218
3219 * c-decl.c: Include "c-family/c-spellcheck.h".
3220
05abad4c
ML
32212017-12-05 Martin Liska <mliska@suse.cz>
3222 Jakub Jelinek <jakub@redhat.com>
3223
3224 * c-typeck.c (pointer_diff): Add new argument and instrument
3225 pointer subtraction.
3226 (build_binary_op): Similar for pointer comparison.
3227
cc6534d4
JJ
32282017-12-01 Jakub Jelinek <jakub@redhat.com>
3229
65791f42
JJ
3230 PR c/79153
3231 * c-parser.c: Include tree-iterator.h.
3232 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3233 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3234 on it.
3235
cc6534d4
JJ
3236 PR c/83222
3237 * c-tree.h (decl_constant_value_1): Declare.
3238 * c-typeck.c (decl_constant_value_1): New function.
3239 (decl_constant_value): Use it.
3240 * c-fold.c (c_fully_fold_internal): If in_init, use
3241 decl_constant_value_1 instead of decl_constant_value.
3242
5de73c05
JJ
32432017-11-30 Jakub Jelinek <jakub@redhat.com>
3244
3245 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3246
058f0b9e
JJ
32472017-11-28 Jakub Jelinek <jakub@redhat.com>
3248
3249 PR sanitizer/81275
3250 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3251 c_switch_covers_all_cases_p returns true.
3252
5e9d6aa4 32532017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3254 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3255
3256 * Make-lang.in (c/c-array-notation.o): Remove.
3257 * c-array-notation.c: Delete.
3258 * c-decl.c: Remove cilkplus condition.
3259 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3260 c_parser_cilk_verify_simd, c_parser_array_notation,
3261 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3262 c_parser_cilk_simd_fn_vector_attrs,
3263 c_finish_cilk_simd_fn_tokens): Delete.
3264 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3265 (c_parser_direct_declarator_inner): Ditto.
3266 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3267 (c_parser_attributes, c_parser_compound_statement,
3268 c_parser_statement_after_labels, c_parser_if_statement,
3269 c_parser_switch_statement, c_parser_while_statement,
3270 c_parser_do_statement, c_parser_for_statement,
3271 c_parser_unary_expression, c_parser_postfix_expression,
3272 c_parser_postfix_expression_after_primary,
3273 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3274 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3275 support.
3276 * c-typeck.c (build_array_ref, build_function_call_vec,
3277 convert_arguments,
3278 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3279 c_finish_loop, build_binary_op): Remove cilkplus support.
3280
9e851845
JJ
32812017-11-28 Jakub Jelinek <jakub@redhat.com>
3282
3283 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3284 of build3.
3285
ab20d992 32862017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3287
3288 * Make-lang.in (c.install-plugin): Install backend import library.
3289
41521dee
JJ
32902017-11-23 Jakub Jelinek <jakub@redhat.com>
3291
3292 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3293 pragma_stmt context.
3294
ac9effed
EB
32952017-11-23 Mike Stump <mikestump@comcast.net>
3296 Eric Botcazou <ebotcazou@adacore.com>
3297
3298 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3299 ANNOTATE_EXPR.
3300 (c_parser_do_statement): Likewise.
3301 (c_parser_for_statement): Likewise.
3302
ce95abc4
DM
33032017-11-22 David Malcolm <dmalcolm@redhat.com>
3304
3305 PR c++/62170
3306 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3307 bool to bool *. Within '%T' handling, if showing an "aka", use
3308 "quoted" param to add appropriate quoting.
3309
974aedcc
MP
33102017-11-22 Marek Polacek <polacek@redhat.com>
3311
3312 PR c++/60336
3313 PR middle-end/67239
3314 PR target/68355
3315 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3316
d4300cc6
DM
33172017-11-21 David Malcolm <dmalcolm@redhat.com>
3318
3319 PR c/83056
3320 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3321 earlier failed lookups.
3322
1af4ebf5
MG
33232017-11-21 Marc Glisse <marc.glisse@inria.fr>
3324
3325 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3326 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3327
26edace6
DM
33282017-11-20 David Malcolm <dmalcolm@redhat.com>
3329
3330 PR c/81404
3331 * c-decl.c: Include "c-family/known-headers.h".
3332 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3333 to known-headers.cc.
3334 (class suggest_missing_header): Move to known-header.h.
3335 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3336 than get_c_name_hint.
3337
b1212255
DM
33382017-11-20 David Malcolm <dmalcolm@redhat.com>
3339
3340 * c-decl.c (get_c_name_hint): New function.
3341 (class suggest_missing_header): New class.
3342 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3343 suggest missing headers to the user.
3344
6c7a259b
DM
33452017-11-20 David Malcolm <dmalcolm@redhat.com>
3346
3347 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3348 Include "c-family/name-hint.h"
3349 (implicit_decl_warning): Convert "hint" from
3350 const char * to name_hint. Pass location to
3351 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3352 warning was not printed.
3353 (undeclared_variable): Likewise for "guessed_id".
3354 (lookup_name_fuzzy): Convert return type from const char *
3355 to name_hint. Add location_t param.
3356 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3357 Include "c-family/name-hint.h"
3358 (c_parser_declaration_or_fndef): Convert "hint" from
3359 const char * to name_hint. Pass location to lookup_name_fuzzy.
3360 (c_parser_parameter_declaration): Likewise.
3361
f9c59f7e
JJ
33622017-11-19 Jakub Jelinek <jakub@redhat.com>
3363
3364 PR c/66618
3365 PR c/69960
3366 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3367 where needed.
3368 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3369 handle_omp_array_sections): Likewise.
3370 (digest_init): Don't call decl_constant_value_for_optimization.
3371 * c-tree.h (decl_constant_value_for_optimization): Removed.
3372 * c-fold.c (c_fold_array_ref): New function.
3373 (c_fully_fold_internal): Add LVAL argument, propagate it through
3374 recursive calls. For VAR_P call decl_constant_value and
3375 unshare if not LVAL and either optimizing or IN_INIT. Remove
3376 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3377 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3378 (c_fully_fold): Add LVAL argument, pass it through to
3379 c_fully_fold_internal.
3380 (decl_constant_value_for_optimization): Removed.
3381
3ca0dc60
JM
33822017-11-15 Joseph Myers <joseph@codesourcery.com>
3383
3384 PR c/81156
3385 * c-parser.c (check_tgmath_function): New function.
3386 (enum tgmath_parm_kind): New enum.
3387 (c_parser_postfix_expression): Handle __builtin_tgmath.
3388
64a5912c
DM
33892017-10-31 David Malcolm <dmalcolm@redhat.com>
3390
3391 * c-decl.c (implicit_decl_warning): Update for renaming of
3392 pedwarn_at_rich_loc and warning_at_rich_loc.
3393 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3394 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3395 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3396 (c_parser_struct_or_union_specifier): Likewise for renaming of
3397 pedwarn_at_rich_loc.
3398 (c_parser_parameter_declaration): Likewise for renaming of
3399 error_at_rich_loc.
3400 * c-typeck.c (build_component_ref): Likewise.
3401 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3402 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3403 (set_init_label): Likewise for renaming of error_at_rich_loc.
3404
c1136864
RB
34052017-10-30 Richard Biener <rguenther@suse.de>
3406
3407 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3408 stmts.
3409
ee5fd23a
MM
34102017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3411
3412 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3413 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3414
1a59ccf2
DM
34152017-10-25 David Malcolm <dmalcolm@redhat.com>
3416
3417 PR c/7356
3418 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3419 semicolons.
3420
bc1a75dd
JJ
34212017-10-25 Jakub Jelinek <jakub@redhat.com>
3422
3423 PR libstdc++/81706
3424 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3425 newdecl to corresponding __builtin_ if any.
3426
ff1ff960
PC
34272017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3428
3429 PR c++/82466
3430 * c-decl.c (diagnose_mismatched_decls): Use
3431 OPT_Wbuiltin_declaration_mismatch.
3432
62e1c678
DM
34332017-10-12 David Malcolm <dmalcolm@redhat.com>
3434
3435 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3436 use it to guard calls to maybe_suggest_missing_token_insertion.
3437 (c_parser_parms_list_declarator): Override default value of new
3438 "type_is_unique" param to c_parser_require.
3439 (c_parser_asm_statement): Likewise.
3440 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3441 defaulting to true.
3442
a92f6726
NS
34432017-10-11 Nathan Sidwell <nathan@acm.org>
3444
3445 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3446
8e6cdc90
RS
34472017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3448
3449 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3450 operating on trees as wide_ints.
3451 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3452 (c_tree_equal): Likewise.
3453
8139a48e
DM
34542017-10-04 David Malcolm <dmalcolm@redhat.com>
3455
3456 * c-decl.c (push_parm_decl): Store c_parm's location into the
3457 PARAM_DECL.
3458 (build_c_parm): Add "loc" param and store it within the c_parm.
3459 * c-parser.c (struct c_parser): Add "last_token_location" field.
3460 (c_parser_consume_token): Store location of the token into the
3461 new field.
3462 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3463 when handling a FUNCTION_DECL, if it doesn't already have them.
3464 (c_parser_parameter_declaration): Generate a location for the
3465 parameter, and pass it to the call to build_c_parm.
3466 * c-tree.h (struct c_parm): Add field "loc".
3467 (build_c_parm): Add location_t param.
3468 * c-typeck.c (get_fndecl_argument_location): New function.
3469 (inform_for_arg): New function.
3470 (convert_for_assignment): Use inform_for_arg when dealing with
3471 ic_argpass.
3472
2a389958
JJ
34732017-09-29 Jakub Jelinek <jakub@redhat.com>
3474
7d386d45
JJ
3475 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3476 width is non-NULL.
3477 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3478 don't SET_DECL_C_BIT_FIELD here.
3479
2a389958
JJ
3480 PR c/82340
3481 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3482 instead of trying to set just TREE_READONLY manually.
3483
ebc6a85e
TV
34842017-09-16 Tom de Vries <tom@codesourcery.com>
3485
3486 PR c/81875
3487 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3488 cond itself.
3489
bb75facd
JM
34902017-09-15 Joseph Myers <joseph@codesourcery.com>
3491
3492 PR c/82071
3493 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3494 for C11.
3495 (build_conditional_expr): For C11, generate result with excess
3496 precision when one argument is an integer and the other is of a
3497 type using excess precision.
3498
1d933576
BE
34992017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3500
3501 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3502
267bbb6f
MP
35032017-09-13 Marek Polacek <polacek@redhat.com>
3504
3505 PR c/82167
3506 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3507 than expr.original_type.
3508
6836632e
NS
35092017-09-12 Nathan Sidwell <nathan@acm.org>
3510
3511 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3512 resort_sorted_fields): Moved from c-family/c-common.c.
3513 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3514
e035be33
JM
35152017-09-01 Joseph Myers <joseph@codesourcery.com>
3516
3517 PR c/82071
3518 * c-typeck.c (build_atomic_assign): Handle argument with excess
3519 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3520 argument passed to build_binary_op and convert_for_assignment but
3521 not for call to c_fully_fold.
3522 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3523 Ensure build_binary_op is called with argument with original
3524 semantic type. Avoid calling c_fully_fold with an
3525 EXCESS_PRECISION_EXPR from build_binary_op.
3526
d2e05fcb
JJ
35272017-09-01 Jakub Jelinek <jakub@redhat.com>
3528
3529 PR c/81887
3530 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3531
b397965c
RS
35322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3533 Alan Hayward <alan.hayward@arm.com>
3534 David Sherwood <david.sherwood@arm.com>
3535
3536 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3537 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3538 m1 and m2 to the signed equivalent of a fixed-point
3539 SCALAR_TYPE_MODE.
3540
14e18d71
DM
35412017-08-24 David Malcolm <dmalcolm@redhat.com>
3542
3543 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3544 than CAN_HAVE_LOCATION_P when determining whether to use the
3545 location_t value within "value".
3546
7f204c0f
DM
35472017-08-21 David Malcolm <dmalcolm@redhat.com>
3548
3549 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3550 rather than peeking the location of the first token.
3551 * c-tree.h (c_expr::get_location): New method.
3552
2f687306
DM
35532017-08-21 David Malcolm <dmalcolm@redhat.com>
3554
3555 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3556 to check_function_arguments.
3557
3e7b80d7
MP
35582017-08-18 Marek Polacek <polacek@redhat.com>
3559
3560 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3561 commentary.
3562
00aa1fa2
L
35632017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3564
3565 PR c/53037
3566 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3567 (check_bitfield_type_and_width): Don't allow bit-field with
3568 warn_if_not_aligned type.
3569
da67acb9
MS
35702017-08-14 Martin Sebor <msebor@redhat.com>
3571
3572 PR c/81117
3573 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3574
bb85aa74
MP
35752017-08-11 Marek Polacek <polacek@redhat.com>
3576
3577 PR c/81795
3578 * c-decl.c (pushtag): Only print inform if the warning was printed.
3579 (grokdeclarator): Likewise.
3580
32129a17
DM
35812017-08-10 David Malcolm <dmalcolm@redhat.com>
3582
3583 * c-parser.c (c_parser_error): Rename to...
3584 (c_parser_error_richloc): ...this, making static, and adding
3585 "richloc" parameter, passing it to the c_parse_error call,
3586 rather than calling c_parser_set_source_position_from_token.
3587 (c_parser_error): Reintroduce, reimplementing in terms of the
3588 above, converting return type from void to bool.
3589 (class token_pair): New class.
3590 (struct matching_paren_traits): New struct.
3591 (matching_parens): New typedef.
3592 (struct matching_brace_traits): New struct.
3593 (matching_braces): New typedef.
3594 (get_matching_symbol): New function.
3595 (c_parser_require): Add param MATCHING_LOCATION, using it to
3596 highlight matching "opening" tokens for missing "closing" tokens.
3597 (c_parser_skip_until_found): Likewise.
3598 (c_parser_static_assert_declaration_no_semi): Convert explicit
3599 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3600 class matching_parens, so that the pertinent open parenthesis is
3601 highlighted when there are problems locating the close
3602 parenthesis.
3603 (c_parser_struct_or_union_specifier): Likewise.
3604 (c_parser_typeof_specifier): Likewise.
3605 (c_parser_alignas_specifier): Likewise.
3606 (c_parser_simple_asm_expr): Likewise.
3607 (c_parser_braced_init): Likewise, for matching_braces.
3608 (c_parser_paren_condition): Likewise, for matching_parens.
3609 (c_parser_switch_statement): Likewise.
3610 (c_parser_for_statement): Likewise.
3611 (c_parser_asm_statement): Likewise.
3612 (c_parser_asm_operands): Likewise.
3613 (c_parser_cast_expression): Likewise.
3614 (c_parser_sizeof_expression): Likewise.
3615 (c_parser_alignof_expression): Likewise.
3616 (c_parser_generic_selection): Likewise.
3617 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3618 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3619 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3620 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3621 c_parser_skip_until_found call.
3622 (c_parser_objc_class_definition): Use class matching_parens as
3623 above.
3624 (c_parser_objc_method_decl): Likewise.
3625 (c_parser_objc_try_catch_finally_statement): Likewise.
3626 (c_parser_objc_synchronized_statement): Likewise.
3627 (c_parser_objc_at_property_declaration): Likewise.
3628 (c_parser_oacc_wait_list): Likewise.
3629 (c_parser_omp_var_list_parens): Likewise.
3630 (c_parser_omp_clause_collapse): Likewise.
3631 (c_parser_omp_clause_default): Likewise.
3632 (c_parser_omp_clause_if): Likewise.
3633 (c_parser_omp_clause_num_threads): Likewise.
3634 (c_parser_omp_clause_num_tasks): Likewise.
3635 (c_parser_omp_clause_grainsize): Likewise.
3636 (c_parser_omp_clause_priority): Likewise.
3637 (c_parser_omp_clause_hint): Likewise.
3638 (c_parser_omp_clause_defaultmap): Likewise.
3639 (c_parser_oacc_single_int_clause): Likewise.
3640 (c_parser_omp_clause_ordered): Likewise.
3641 (c_parser_omp_clause_reduction): Likewise.
3642 (c_parser_omp_clause_schedule): Likewise.
3643 (c_parser_omp_clause_num_teams): Likewise.
3644 (c_parser_omp_clause_thread_limit): Likewise.
3645 (c_parser_omp_clause_aligned): Likewise.
3646 (c_parser_omp_clause_linear): Likewise.
3647 (c_parser_omp_clause_safelen): Likewise.
3648 (c_parser_omp_clause_simdlen): Likewise.
3649 (c_parser_omp_clause_depend): Likewise.
3650 (c_parser_omp_clause_map): Likewise.
3651 (c_parser_omp_clause_device): Likewise.
3652 (c_parser_omp_clause_dist_schedule): Likewise.
3653 (c_parser_omp_clause_proc_bind): Likewise.
3654 (c_parser_omp_clause_uniform): Likewise.
3655 (c_parser_omp_for_loop): Likewise.
3656 (c_parser_cilk_clause_vectorlength): Likewise.
3657 (c_parser_cilk_clause_linear): Likewise.
3658 (c_parser_transaction_expression): Likewise.
3659 * c-parser.h (c_parser_require): Add param matching_location with
3660 default UNKNOWN_LOCATION.
3661 (c_parser_error): Convert return type from void to bool.
3662 (c_parser_skip_until_found): Add param matching_location with
3663 default UNKNOWN_LOCATION.
3664
30af3a2b
MP
36652017-08-09 Marek Polacek <polacek@redhat.com>
3666
3667 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3668 * c-tree.h (build_external_ref): Update declaration.
3669 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3670 (build_external_ref): Change the type of a parameter to bool.
3671 (parser_build_binary_op): Use true/false instead of 1/0.
3672 (pointer_diff): Likewise.
3673 (build_modify_expr): Likewise.
3674 (set_designator): Change the type of a parameter to bool.
3675 (set_init_index): Use true/false instead of 1/0.
3676 (set_init_label): Likewise.
3677 (output_init_element): Change the type of a parameter to bool.
3678 (output_pending_init_elements): Use true/false instead of 1/0.
3679 (process_init_element): Likewise.
3680 (build_binary_op): Change the type of a parameter to bool.
3681
296c53ac
MP
36822017-08-09 Marek Polacek <polacek@redhat.com>
3683
3684 PR c/81233
3685 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3686 Call emit_diagnostic_valist instead of pedwarn.
3687 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3688 Print the relevant types in diagnostics.
3689
a32c8316
MP
36902017-08-09 Marek Polacek <polacek@redhat.com>
3691
3692 PR c/81417
3693 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3694 build_conditional_expr.
a32c8316
MP
3695 * c-parser.c (c_parser_conditional_expression): Create locations for
3696 EXP1 and EXP2 from their source ranges. Pass the locations down to
3697 build_conditional_expr.
3698 * c-tree.h (build_conditional_expr): Update declaration.
3699 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3700 For -Wsign-compare, also print the types.
3701
314e6352
ML
37022017-08-08 Martin Liska <mliska@suse.cz>
3703
3704 * c-convert.c: Include header files.
3705 * c-typeck.c: Likewise.
3706
577eec56
ML
37072017-08-07 Martin Liska <mliska@suse.cz>
3708
3709 * c-parser.c (c_parser_attributes): Canonicalize name of an
3710 attribute.
3711
f7b6353a
MP
37122017-08-02 Marek Polacek <polacek@redhat.com>
3713
3714 PR c/81289
3715 * c-parser.c (c_parser_unary_expression): Use set_error.
3716
8a6eab34
MP
3717 PR c/81448
3718 PR c/81306
3719 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3720 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3721
ab20d992 37222017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3723 Martin Liska <mliska@suse.cz>
3724
3725 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3726 statement.
7fef86d3 3727
f34ebeb2
ML
37282017-07-31 Martin Liska <mliska@suse.cz>
3729
3730 PR sanitize/81530
3731 * c-convert.c (convert): Guard condition with flag_sanitize_p
3732 also with current_function_decl non-null equality.
3733 * c-decl.c (grokdeclarator): Likewise.
3734 * c-typeck.c (build_binary_op): Likewise.
3735
8595f67b
MP
37362017-07-25 Marek Polacek <polacek@redhat.com>
3737
3738 * c-decl.c (grokfield): Remove local variable.
3739
d49718d6
MP
37402017-07-25 Marek Polacek <polacek@redhat.com>
3741
3742 PR c/81364
3743 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3744 macro expansion if the body is in { }.
3745 (c_parser_while_statement): Likewise.
3746 (c_parser_for_statement): Likewise.
3747
ff22eb12
NS
37482017-07-18 Nathan Sidwell <nathan@acm.org>
3749
3750 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3751
eea77d1f
DM
37522017-07-14 David Malcolm <dmalcolm@redhat.com>
3753
3754 * c-decl.c (implicitly_declare): When suggesting a missing
3755 #include, provide a fix-it hint.
3756
b6f43128
DM
37572017-07-06 David Malcolm <dmalcolm@redhat.com>
3758
3759 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3760 and call that instead.
3761 * c-tree.h (selftest::run_c_tests): New decl.
3762
3e2becc4
MP
37632017-06-26 Marek Polacek <polacek@redhat.com>
3764
3765 PR c/80116
3766 * c-parser.c (c_parser_if_body): Set the location of the
3767 body of the conditional after parsing all the labels. Call
3768 warn_for_multistatement_macros.
3769 (c_parser_else_body): Likewise.
3770 (c_parser_switch_statement): Likewise.
3771 (c_parser_while_statement): Likewise.
3772 (c_parser_for_statement): Likewise.
3773 (c_parser_statement): Add a default argument. Save the location
3774 after labels have been parsed.
3775 (c_parser_c99_block_statement): Likewise.
3776
343ae898
RB
37772017-06-19 Richard Biener <rguenther@suse.de>
3778
3779 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3780 negated _Literals to parse _Literal (int) -1.
3781
45b2222a
ML
37822017-06-13 Martin Liska <mliska@suse.cz>
3783
3784 PR sanitize/78204
3785 * c-convert.c (convert): Use sanitize_flags_p.
3786 * c-decl.c (grokdeclarator): Likewise.
3787 * c-typeck.c (convert_for_assignment): Likewise.
3788 (c_finish_return): Likewise.
3789 (build_binary_op): Likewise.
3790
8ab7005b
JJ
37912017-06-08 Jakub Jelinek <jakub@redhat.com>
3792
3793 PR c/81006
3794 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3795 to sizetype before size_binop.
3796
363dc72c
JJ
37972017-06-07 Jakub Jelinek <jakub@redhat.com>
3798
3799 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3800 of TDI_generic.
3801
dc949728
MP
38022017-06-06 Marek Polacek <polacek@redhat.com>
3803
3804 PR c/79983
3805 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3806 ref.
3807 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3808
40ffd95f
BE
38092017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3810
3811 * c-parser.c (c_parser_binary_expression): Implement the
3812 -Wsizeof_pointer_div warning.
3813 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3814 from a parenthesized expression.
3815 (c_parser_expr_list): Use c_last_sizeof_loc.
3816 * c-tree.h (c_last_sizeof_loc): New external.
3817 * c-typeck.c (c_last_sizeof_loc): New variable.
3818 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3819
9fc5e7a4
MM
38202017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3821
3822 PR testsuite/80580
3823 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3824
f012c8ef
DM
38252017-05-30 David Malcolm <dmalcolm@redhat.com>
3826
3827 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3828 parameters.
3829
3cd211af
MS
38302017-05-24 Martin Sebor <msebor@redhat.com>
3831
3832 PR c/80731
3833 * c-fold.c (c_fully_fold_internal): Adjust.
3834 * c-typeck.c (parser_build_unary_op): Adjust.
3835
fd71a9a2
TS
38362017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3837
3838 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3839 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3840 "VECTOR_LENGTH".
3841
92fa0f9e
MP
38422017-05-23 Marek Polacek <polacek@redhat.com>
3843
3844 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3845 quotes.
3846
d11c168a
JJ
38472017-05-22 Jakub Jelinek <jakub@redhat.com>
3848
3849 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3850 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3851 it returned invariant. Call tree_invariant_p unconditionally
3852 afterwards to decide whether to return expr or op0.
3853
58aca9d9
NS
38542017-05-22 Nathan Sidwell <nathan@acm.org>
3855
3856 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3857
7fd549d2
TS
38582017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3859
3860 * c-parser.c (c_parser_omp_clause_default): Handle
3861 "OMP_CLAUSE_DEFAULT_PRESENT".
3862
6ecd2339
BE
38632017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3864
3865 * config-lang.in (gtfiles): Add c-family/c-format.c.
3866
8a57ecff
NS
38672017-05-18 Nathan Sidwell <nathan@acm.org>
3868
3869 * c-decl.c (pushdecl_top_level): Delete unused function.
3870
6574d78e
MP
38712017-05-18 Marek Polacek <polacek@redhat.com>
3872
3873 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3874 (check_earlier_gotos): Likewise.
3875 (define_label): Likewise.
3876 (pending_xref_error): Likewise.
3877 (smallest_type_quals_location): Likewise.
3878 (grokdeclarator): Likewise.
3879 (grokparms): Likewise.
3880 (identifier_global_value): Likewise.
3881 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3882 (find_init_member): Likewise.
3883
e3455240
MP
38842017-05-18 Marek Polacek <polacek@redhat.com>
3885
3886 * c-decl.c (start_decl): Use false/true instead of 0/1.
3887 (grokdeclarator): Likewise.
3888 (finish_struct): Likewise.
3889 (start_function): Change the return type to bool. Use false/true
3890 instead of 0/1.
3891 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3892 * c-tree.h (start_function): Update.
3893 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3894 (set_designator): Change the return type to bool. Use false/true
3895 instead of 0/1.
3896
3fa8871b
MP
38972017-05-17 Marek Polacek <polacek@redhat.com>
3898
3899 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3900 * c-typeck.c: Likewise.
3901
142473df
MP
39022017-05-17 Marek Polacek <polacek@redhat.com>
3903
3904 PR sanitizer/80659
3905 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3906 DECL_IGNORED_P even for non-static compound literals.
3907
1a817418
ML
39082017-05-17 Martin Liska <mliska@suse.cz>
3909
3910 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3911 use it instead of int type.
3912
b2fa0a8b
MP
39132017-05-17 Marek Polacek <polacek@redhat.com>
3914
3915 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3916 call c_fully_fold.
3917 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3918 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3919 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3920 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3921 save_expr.
3922 (c_parser_conditional_expression): Likewise.
3923 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3924 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3925 (process_init_element): Likewise.
3926 (build_binary_op): Likewise.
3927 (handle_omp_array_sections_1): Likewise.
3928
1e47f02b
TS
39292017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3930
3931 * c-parser.c (c_parser_omp_clause_num_gangs)
3932 (c_parser_omp_clause_num_workers)
3933 (c_parser_omp_clause_vector_length): Merge functions into...
3934 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3935 all users.
3936
c24e924f
NS
39372017-05-11 Nathan Sidwell <nathan@acm.org>
3938
3939 * gimple-parser.c: Don't #include tree-dump.h.
3940
c587104e
MM
39412017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3942
3943 PR testsuite/80580
3944 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3945
67ac9a9d
MM
39462017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3947
3948 PR testsuite/80580
3949 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3950 incorrect __MEM syntax.
3951
ac4eb40f
MM
39522017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3953
3954 PR testsuite/80580
3955 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3956 type of unary '*'.
3957
641da50a
NS
39582017-05-09 Nathan Sidwell <nathan@acm.org>
3959
3960 * c-tree.h (pushdecl): Declare.
3961
56d35585
DM
39622017-05-05 David Malcolm <dmalcolm@redhat.com>
3963
3964 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3965 with diagnostic_report_diagnostic.
3966 * c-errors.c (pedwarn_c99): Likewise.
3967 (pedwarn_c90): Likewise.
3968
815d9cc6
XR
39692017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3970
92a285c1 3971 PR c++/80038
815d9cc6
XR
3972 * c-gimplify.c (c_gimplify_expr): Remove calls to
3973 cilk_gimplifY_call_params_in_spawned_fn.
3974
1c4ea66f
DM
39752017-04-25 David Malcolm <dmalcolm@redhat.com>
3976
3977 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3978 hint for removing extra semicolon.
3979
666f7903
JJ
39802017-04-21 Jakub Jelinek <jakub@redhat.com>
3981
3982 PR c/80468
3983 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3984 enabled, set specs->type to integer_type_node.
3985
5764ee3c
JW
39862017-04-03 Jonathan Wakely <jwakely@redhat.com>
3987
3988 * c-array-notation.c: Fix typo in comment.
3989
10fa8dfb
MP
39902017-03-29 Marek Polacek <polacek@redhat.com>
3991
3992 PR c/79730
3993 * c-decl.c (finish_decl): Check VAR_P.
3994
a9e4a1a5
JJ
39952017-03-27 Jakub Jelinek <jakub@redhat.com>
3996
3997 PR middle-end/80162
3998 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3999 * c-typeck.c (c_mark_addressable): Likewise. Look through
4000 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4001 to ARRAY_TYPE.
4002 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4003
ee3ff394
MP
40042017-03-23 Marek Polacek <polacek@redhat.com>
4005
4006 * c-tree.h: Remove a C_RID_YYCODE reference.
4007
4d1b8e70
JJ
40082017-03-21 Jakub Jelinek <jakub@redhat.com>
4009
4010 PR c/80097
4011 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4012 optional COMPOUND_EXPR with ubsan instrumentation.
4013
31dc71a8
MP
40142017-03-17 Marek Polacek <polacek@redhat.com>
4015
4016 * c-parser.c: Add C11 references.
4017
d579c385
MP
40182017-03-15 Marek Polacek <polacek@redhat.com>
4019
4020 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4021
85059a38
MP
40222017-03-11 Marek Polacek <polacek@redhat.com>
4023
4024 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4025
2f6f187a
DM
40262017-03-10 David Malcolm <dmalcolm@redhat.com>
4027
4028 PR translation/79848
4029 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4030 "%qs".
4031 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4032
36618428
MP
40332017-03-09 Marek Polacek <polacek@redhat.com>
4034
4035 PR sanitizer/79757
4036 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4037 parameter declarations with initializers.
4038
01e5af5a
JJ
40392017-03-09 Jakub Jelinek <jakub@redhat.com>
4040
4041 PR c/79969
4042 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4043 TYPE_STUB_DECL.
4044
a71dbc63
JJ
40452017-03-07 Jakub Jelinek <jakub@redhat.com>
4046
4047 PR c/79834
4048 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4049 for "may only be used in compound statements" diagnostics, change it
4050 such that the same translatable string is used for all pragmas. For
4051 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4052 diagnostics.
4053 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4054 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4055 "may only be used in compound statements" diagnostics, such that the
4056 same translatable string is used for all pragmas.
4057
1ff4bae6
MP
40582017-03-04 Marek Polacek <polacek@redhat.com>
4059
4060 PR c/79847
4061 * c-decl.c (implicit_decl_warning): Add missing space.
4062
7f5a7d78
MP
40632017-03-03 Marek Polacek <polacek@redhat.com>
4064
4065 PR c/79758
4066 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4067 current_function_prototype_arg_types is error_mark_node. Fix
4068 formatting. Use TREE_VALUE instead of TREE_TYPE.
4069
883c8f06
JJ
40702017-03-03 Jakub Jelinek <jakub@redhat.com>
4071
79c9b7a8
JJ
4072 PR c/79837
4073 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4074 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4075 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4076 diagnostics.
4077
883c8f06
JJ
4078 PR c/79836
4079 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4080 instead of %<_Generic>.
4081 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4082 (c_parser_omp_target_exit_data): Use %<release%> instead of
4083 %<release>.
4084
324ff1a0
JJ
40852017-02-28 Jakub Jelinek <jakub@redhat.com>
4086
4087 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4088 instead of just cond ? "..." : "...".
4089 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4090 for "enter"/"exit" keyword.
4091 (c_finish_oacc_routine): Don't use %s to supply portions of the
4092 message.
4093
4227c9ad
JJ
40942017-02-24 Jakub Jelinek <jakub@redhat.com>
4095
4096 PR c++/79588
4097 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4098 handle -Wrestrict here.
4099 * c-typeck.c (build_function_call_vec): Adjust
4100 check_function_arguments caller.
4101
5d972e66
RB
41022017-02-23 Richard Biener <rguenther@suse.de>
4103
4104 PR c/79684
4105 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4106 to initialize c_exprs to return.
4107 (c_parser_gimple_binary_expression): Likewise.
4108 (c_parser_gimple_unary_expression): Likewise.
4109 (c_parser_gimple_postfix_expression): Likewise.
4110
61ac5ebe
MP
41112017-02-22 Marek Polacek <polacek@redhat.com>
4112
4113 PR c/79662
4114 * c-typeck.c (convert_arguments): Handle error_mark_node.
4115
41d1b0b1
PK
41162017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4117
4118 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4119 value of c_parser_parse_ssa_name against error_mark_node and emit
4120 error if ssa name is anonymous and written as default definition.
4121
eab1f169
PK
41222017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4123
4124 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4125 FMA_EXPR.
4126
bcac0b4d
JJ
41272017-02-16 Jakub Jelinek <jakub@redhat.com>
4128
4129 PR c++/79512
4130 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4131 ignore #pragma omp target even when not followed by identifier.
4132
1be33173
PK
41332017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4134
4135 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4136 (c_parser_gimple_unary_expression): Likewise.
4137
aa326bfb
JJ
41382017-02-13 Jakub Jelinek <jakub@redhat.com>
4139
4140 * c-parser.c (c_parser_oacc_declare): Add missing space in
4141 diagnostics.
4142
8a398bc5
PK
41432017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4144
4145 PR c/79478
4146 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4147 set_c_expr_source_range when parsing ssa-name.
4148
3dcde5ef 41492017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4150 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4151
4152 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4153 building IL when arguments are error_mark_node.
4154 (c_parser_gimple_unary_expression): Likewise.
4155 (c_parser_gimple_if_stmt): Likewise.
4156 (c_parser_gimple_switch_stmt): Likewise.
4157 (c_parser_gimple_return_stmt): Likewise.
4158 (c_parser_parse_ssa_name): When name lookup fails do not build
4159 an SSA name. Use undeclared rather than not declared in error
4160 reporting.
4161
192b048b
MP
41622017-02-09 Marek Polacek <polacek@redhat.com>
4163
4164 PR c/79428
4165 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4166 instead of c_parser_skip_until_found.
4167
56f71478
JJ
41682017-02-09 Jakub Jelinek <jakub@redhat.com>
4169
4170 PR c/79431
4171 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4172 symtab_node::get on automatic variables.
4173
02889d23
CLT
41742016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4175 Chung-Lin Tang <cltang@codesourcery.com>
4176
4177 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4178 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4179 semantic checking.
4180 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4181
7af4b20d
RB
41822017-02-07 Richard Biener <rguenther@suse.de>
4183
4184 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4185 (c_parser_gimple_postfix_expression_after_primary):
4186 Do not use c_build_function_call_vec to avoid folding and promotion.
4187 Simplify.
4188
e5e391d6
MO
41892017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4190
4191 PR lto/79061
4192 * c-decl.c (pop_scope): Pass main_input_filename to
4193 build_translation_unit_decl.
4194
c2e84327
DM
41952017-01-24 David Malcolm <dmalcolm@redhat.com>
4196
4197 * c-parser.c: Include "read-rtl-function.h" and
4198 "run-rtl-passes.h".
4199 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4200 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4201 production. Update for renaming of field "gimple_pass" to
4202 "gimple_or_rtl_pass". If __RTL was seen, call
4203 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4204 to an auto_timevar, to cope with early exit.
4205 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4206 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4207 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4208 Handle RID_RTL.
4209 (c_parser_parse_rtl_body): New function.
4210 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4211 (struct c_declspecs): Rename field "gimple_pass" to
4212 "gimple_or_rtl_pass". Add field "rtl_p".
4213 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4214 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4215 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4216 (c_parser_gimple_or_rtl_pass_list): ...this.
4217
2ebd93e1
MP
42182017-01-20 Marek Polacek <polacek@redhat.com>
4219
4220 PR c/64279
4221 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4222
b1c95bb5
RB
42232017-01-13 Richard Biener <rguenther@suse.de>
4224
4225 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4226 nops.
4227
25329913
RB
42282017-01-13 Richard Biener <rguenther@suse.de>
4229
4230 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4231 _Literal ( type-name ) number.
4232
6bb4ea5c
RB
42332017-01-12 Richard Biener <rguenther@suse.de>
4234
4235 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4236 __MEM.
4237
6b5b4e9c
JJ
42382017-01-11 Jakub Jelinek <jakub@redhat.com>
4239
4240 PR c++/72813
4241 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4242 PCH file.
4243
e3252775
RB
42442017-01-11 Richard Biener <rguenther@suse.de>
4245
4246 PR bootstrap/79052
4247 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4248 returns on parse errors.
4249
a9342885
MP
42502017-01-04 Marek Polacek <polacek@redhat.com>
4251
4252 PR c++/64767
4253 * c-parser.c (c_parser_postfix_expression): Mark zero character
4254 constants by setting original_type in c_expr.
4255 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4256 with a zero character constant.
4257 (char_type_p): New function.
4258
5dd9a9d0
DM
42592017-01-04 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-parser.c (c_parser_declaration_or_fndef): Create a
4262 rich_location at init_loc and parse it to start_init.
4263 (last_init_list_comma): New global.
4264 (c_parser_braced_init): Update last_init_list_comma when parsing
4265 commas. Pass it to pop_init_level. Pass location of closing
4266 brace to pop_init_level.
4267 (c_parser_postfix_expression_after_paren_type): Create a
4268 rich_location at type_loc and parse it to start_init.
4269 (c_parser_omp_declare_reduction): Likewise for loc.
4270 * c-tree.h (start_init): Add rich_location * param.
4271 (pop_init_level): Add location_t param.
4272 * c-typeck.c (struct initializer_stack): Add field
4273 "missing_brace_richloc".
4274 (start_init): Add richloc param, use it to initialize
4275 the stack node's missing_brace_richloc.
4276 (last_init_list_comma): New decl.
4277 (finish_implicit_inits): Pass last_init_list_comma to
4278 pop_init_level.
4279 (push_init_level): When finding missing open braces, add fix-it
4280 hints to the richloc.
4281 (pop_init_level): Add "insert_before" param and pass it
4282 when calling pop_init_level. Add fixits about missing
4283 close braces to any richloc. Use the richloc for the
4284 -Wmissing-braces warning.
4285 (set_designator): Pass last_init_list_comma to pop_init_level.
4286 (process_init_element): Likewise.
4287
cbe34bb5
JJ
42882017-01-01 Jakub Jelinek <jakub@redhat.com>
4289
4290 Update copyright years.
4291
d17680f3
JJ
42922016-12-21 Jakub Jelinek <jakub@redhat.com>
4293
0dba7960
JJ
4294 PR bootstrap/78817
4295 * c-typeck.c (build_function_call_vec): If check_function_arguments
4296 returns true, set TREE_NO_WARNING on CALL_EXPR.
4297
d17680f3
JJ
4298 PR c/77767
4299 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4300 to *expr instead of overwriting it.
4301
aa90531e
RB
43022016-12-20 Richard Biener <rguenther@suse.de>
4303
4304 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4305 error recovery.
4306 (c_parser_gimple_statement): Only build assigns for non-error
4307 stmts.
4308 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4309
629b3d75
MJ
43102016-12-14 Martin Jambor <mjambor@suse.cz>
4311
4312 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4313 omp-low.h.
4314 (c_finish_oacc_routine): Adjusted call to
4315 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4316 to use their new names.
4317 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4318 use its new name.
4319 (c_parser_oacc_update): Likewise.
4320 (c_parser_omp_simd): Likewise.
4321 (c_parser_omp_target_update): Likewise.
4322 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4323 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4324 name.
4325 (c_finish_omp_cancellation_point): Likewise.
4326 * gimple-parser.c: Do not include omp-low.h
4327
c5af52eb
CP
43282016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4329 James Norris <jnorris@codesourcery.com>
4330
4331 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4332 EXIT_DATA,WAIT} are not used in compound statements.
4333 (c_parser_oacc_enter_exit_data): Update diagnostics.
4334
48330c93
BE
43352016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4336
4337 PR c++/71973
4338 * c-decl.c (diagnose_mismatched_decls): Use
4339 OPT_Wbuiltin_declaration_mismatch here too.
4340
899ca90e 43412016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4342 Alan Hayward <alan.hayward@arm.com>
4343 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4344
4345 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4346 (make_label, finish_struct): Likewise.
4347
1ee62b92 43482016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4349 Richard Biener <rguenther@suse.de>
22b15758 4350
8e745a17
JJ
4351 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4352 * config-lang.in (gtfiles): Add c/c-parser.h.
4353 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4354 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4355 * c-parser.c (enum c_id_kind, struct c_token,
4356 c_parser_next_token_is, c_parser_next_token_is_not,
4357 c_parser_next_token_is_keyword,
4358 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4359 Split out to ...
4360 * c-parser.h: ... new header.
4361 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4362 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4363 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4364 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4365 c_parser_error, c_parser_require, c_parser_skip_until_found,
4366 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4367 c_parser_type_name): Export.
4368 (c_parser_tokens_buf): New function.
4369 (c_parser_error): Likewise.
4370 (c_parser_set_error): Likewise.
4371 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4372 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4373 via c_parser_parse_gimple_body.
8e745a17
JJ
4374 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4375 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4376 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4377 c_parser_error, c_parser_require, c_parser_skip_until_found,
4378 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4379 c_parser_type_name): Declare.
1ee62b92
PG
4380 (struct c_parser): Declare forward.
4381 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4382 (c_parser_error): Likewise.
4383 (c_parser_set_error): Likewise.
4384 * gimple-parser.c: New file.
4385 * gimple-parser.h: Likewise.
1ee62b92 4386
22b15758
UB
43872016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4388
4389 PR c/35503
4390 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4391 warn_for_restrict.
4392
84ff4775
LCW
43932016-09-11 Le-Chun Wu <lcwu@google.com>
4394 Mark Wielaard <mjw@redhat.com>
4395
4396 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4397 to the given -Wshadow= variant.
4398
4d0cdd0c
TP
43992016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4400
4401 * c-typeck.c: Include memmodel.h.
4402
1202f33e
JJ
44032016-10-13 Jakub Jelinek <jakub@redhat.com>
4404
4405 PR target/77957
4406 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4407 instead of lhd_return_null_tree_v.
4408
8a14afd0
BS
44092016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4410
4411 PR c++/69733
4412 * c-decl.c (smallest_type_quals_location): New static function.
4413 (grokdeclarator): Try to find the correct location for an ignored
4414 qualifier.
4415
81fea426
MP
44162016-09-26 Marek Polacek <polacek@redhat.com>
4417
4418 PR c/7652
4419 * c-decl.c (pop_scope): Add gcc_fallthrough.
4420
44212016-09-26 Marek Polacek <polacek@redhat.com>
4422
4423 PR c/7652
4424 * c-parser.c (struct c_token): Add flags field.
4425 (c_lex_one_token): Pass it to c_lex_with_flags.
4426 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4427 into IFN_FALLTHROUGH.
4428 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4429 attribute fallthrough after a case label or default label.
4430 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4431
9a2300e9
MP
44322016-09-24 Marek Polacek <polacek@redhat.com>
4433
4434 PR c/77490
4435 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4436 have boolean value. Warn about ++/-- on booleans.
4437
7de76362
JJ
44382016-09-23 Jakub Jelinek <jakub@redhat.com>
4439
4440 * c-parser.c (incomplete_record_decls): Remove unnecessary
4441 = vNULL initialization of file scope vec.
4442
5b73d2ab
MP
44432016-09-16 Marek Polacek <polacek@redhat.com>
4444
4445 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4446
e51fbec3
MP
44472016-09-14 Marek Polacek <polacek@redhat.com>
4448
4449 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4450 (fix_array_notation_expr): Likewise.
4451 * c-decl.c (finish_decl): Likewise.
4452 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4453 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4454 (function_to_pointer_conversion): Use false instead of 0.
4455 (convert_lvalue_to_rvalue): Likewise.
4456 (parser_build_unary_op): Likewise.
4457 (build_atomic_assign): Likewise.
4458 (build_unary_op): Change nonconvert parameter type to bool, use
4459 true/false instead of 1/0.
4460 (build_binary_op): Use true instead of 1.
4461
254830ba
DM
44622016-09-13 David Malcolm <dmalcolm@redhat.com>
4463
4464 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4465 of add_fixit_insert to add_fixit_insert_before.
4466
4c13ba17
MP
44672016-09-13 Marek Polacek <polacek@redhat.com>
4468
4469 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4470 it.
4471
54dcdb88
BE
44722016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4473
4474 PR c++/77496
4475 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4476 COMPOUND_EXPR to warn_for_omitted_condop.
4477
e5106e27
DM
44782016-09-07 David Malcolm <dmalcolm@redhat.com>
4479
4480 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4481 c_get_substring_location for this new langhook.
4482
9dc5773f
JJ
44832016-09-02 Jakub Jelinek <jakub@redhat.com>
4484
4485 PR c/65467
4486 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4487 flag_openmp.
4488 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4489 instead of mark_exp_read on low_bound/length expression.
4490 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4491 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4492 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4493 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4494 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4495 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4496 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4497 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4498 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4499 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4500 instead of mark_expr_read.
4501 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4502 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4503 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4504 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4505 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4506 array section bases outside of depend clause, for depend clause
4507 use convert_lvalue_to_rvalue on the base.
4508 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4509 linear, aligned, map, to and from clauses.
4510 (c_omp_clause_copy_ctor): New function.
4511
295844f6
MP
45122016-09-01 Marek Polacek <polacek@redhat.com>
4513
4514 PR c/7652
4515 * c-typeck.c (composite_type): Add FALLTHRU comment.
4516
089af25c
DM
45172016-08-31 David Malcolm <dmalcolm@redhat.com>
4518
4519 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4520 to the insertion fixits for "struct", "union", and "enum".
4521
f9087798
DM
45222016-08-30 David Malcolm <dmalcolm@redhat.com>
4523
4524 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4525 rather than add_fixit_misspelled_id.
4526 (undeclared_variable): Likewise.
4527 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4528 now-redundant "here" params from add_fixit_insert method calls.
4529 (c_parser_parameter_declaration): Likewise.
4530 * c-typeck.c (build_component_ref): Remove now-redundant range
4531 param from add_fixit_replace method calls.
4532
ebef225f
MP
45332016-08-25 Marek Polacek <polacek@redhat.com>
4534
4535 * c-typeck.c (parser_build_binary_op): Pass LHS to
4536 warn_logical_not_parentheses.
4537
fe377a48
MP
45382016-08-25 Marek Polacek <polacek@redhat.com>
4539
4540 PR c/77323
4541 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4542 or _FloatN or _FloatNx is not supported.
4543 (finish_declspecs): Set type to integer_type_node when _FloatN or
4544 _FloatNx is not supported.
4545
c65699ef
JM
45462016-08-19 Joseph Myers <joseph@codesourcery.com>
4547
4548 PR c/32187
4549 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4550 (struct c_declspecs): Add field floatn_nx_idx.
4551 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4552 and _FloatNx type specifiers.
4553 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4554 (c_parser_declspecs, c_parser_attribute_any_word)
4555 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4556 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4557 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4558 narrower than double.
4559
2f1364c2
JJ
45602016-08-12 Jakub Jelinek <jakub@redhat.com>
4561 Martin Liska <mliska@suse.cz>
4562
4563 PR c/67410
4564 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4565 % to determine val element to change. Assert that
4566 wchar_bytes * charwidth fits into val array.
4567
191816a3
MP
45682016-08-12 Marek Polacek <polacek@redhat.com>
4569
4570 PR c/7652
4571 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4572 (c_parser_postfix_expression): Likewise.
4573 * c-typeck.c (build_unary_op): Adjust fall through comment.
4574 (c_mark_addressable): Likewise.
4575
b95a64bb
JJ
45762016-08-11 Jakub Jelinek <jakub@redhat.com>
4577
4578 PR c/72816
4579 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4580 array member through typedef, for orig_qual_indirect == 0 clear
4581 orig_qual_type.
4582
895aa8e1
DM
45832016-08-08 David Malcolm <dmalcolm@redhat.com>
4584
4585 PR c/64955
4586 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4587 this up to selftest::run_c_tests.
4588 (selftest::run_c_tests): New function.
4589
0b212d8c
TS
45902016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4591
ae9281fc
TS
4592 * c-parser.c (struct oacc_routine_data): Add error_seen and
4593 fndecl_seen members.
4594 (c_finish_oacc_routine): Use these.
4595 (c_parser_declaration_or_fndef): Adjust.
4596 (c_parser_oacc_routine): Likewise. Support more C language
4597 constructs, and improve diagnostics. Move pragma context
4598 checking...
4599 (c_parser_pragma): ... here.
4600
0b212d8c
TS
4601 * c-parser.c (struct oacc_routine_data): New.
4602 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4603 Simplify code.
4604 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4605 declare target" attribute.
4606
76e2c821
JB
46072016-08-01 Jan Beulich <jbeulich@suse.com>
4608
4609 * c-fold.c (c_fully_fold_internal): Also emit shift count
4610 warnings for vector types.
4611 * c-typeck.c (build_binary_op): Likewise.
4612
f618a472
MP
46132016-07-29 Marek Polacek <polacek@redhat.com>
4614
4615 PR c/71742
4616 * c-decl.c (finish_struct): Rephrase an error message.
4617
efd0786f
MP
4618 PR c/71853
4619 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4620 to error node for invalid code.
4621
e00dceaf
MP
4622 PR c/71573
4623 * c-decl.c (implicitly_declare): Return decl early not only for
4624 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4625
673a107a
JJ
46262016-07-29 Jakub Jelinek <jakub@redhat.com>
4627
4628 PR c/71969
4629 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4630 on GNU extern inline functions.
4631
a5b5c8b6
MP
46322016-07-29 Marek Polacek <polacek@redhat.com>
4633
4634 PR c/71583
4635 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4636 check expr.value.
4637
e3fe09c1
UB
46382016-07-22 Uros Bizjak <ubizjak@gmail.com>
4639
4640 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4641
7c8f7eaa
DM
46422016-07-20 David Malcolm <dmalcolm@redhat.com>
4643
4644 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4645 spellcheck-tree.h
4646 (best_macro_match): Likewise, converting from a typedef to a
4647 subclass.
4648 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4649 (lookup_name_fuzzy): Update for change of best_macro_match to a
4650 subclass with a ctor that calls cpp_forall_identifiers.
4651
de6a69ee
DM
46522016-07-20 David Malcolm <dmalcolm@redhat.com>
4653
4654 * c-decl.c (implicit_decl_warning): Update for conversion of
4655 return type of lookup_name_fuzzy to const char *.
4656 (undeclared_variable): Likewise.
4657 (lookup_name_fuzzy): Convert return type from tree to
4658 const char *.
4659 * c-parser.c (c_parser_declaration_or_fndef): Update for
4660 conversion of return type of lookup_name_fuzzy to const char *.
4661 (c_parser_parameter_declaration): Likewise.
4662
b1c9c068
CP
46632016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4664
4665 * c-parser.c (c_parser_oacc_declare): Don't scan for
4666 GOMP_MAP_POINTER.
4667 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4668 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4669 zero-length subarrays.
4670
ddbbcb19
JJ
46712016-07-15 Jakub Jelinek <jakub@redhat.com>
4672
4673 PR c/71858
4674 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4675 instead of FUZZY_LOOKUP_NAME.
4676 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4677 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4678
dd36b877
JJ
46792016-07-14 Jakub Jelinek <jakub@redhat.com>
4680
4681 PR c/71858
4682 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4683
8c681247
TS
46842016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4685
4686 * c-parser.c (c_parser_generic_selection): Make type of variable
4687 auto_vec.
4688 (c_parser_omp_declare_simd): Likewise.
4689
bf4fa671
TS
46902016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4691
4692 * c-decl.c (struct c_struct_parse_info): Change member types
4693 from vec to auto_vec.
4694 (start_struct): Adjust.
4695 (finish_struct): Likewise.
4696
557e8c49
JJ
46972016-07-02 Jakub Jelinek <jakub@redhat.com>
4698
4699 PR c/71719
4700 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4701
54d19c3b
TS
47022016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4703
4704 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4705 Move pragma context checking into...
4706 (c_parser_omp_cancellation_point): ... here, and improve
4707 diagnostic messages.
4708 * c-typeck.c (c_finish_omp_cancel)
4709 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4710
152ef731
JJ
47112016-06-29 Jakub Jelinek <jakub@redhat.com>
4712
4713 PR c/71685
4714 * c-typeck.c (c_build_qualified_type): Don't clear
4715 C_TYPE_INCOMPLETE_VARS for the main variant.
4716
47172016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4718
4719 PR c/71552
4720 * c-typeck.c (output_init_element): Diagnose incompatible types
4721 before non-constant initializers.
4722
e9ac1f86
JJ
47232016-06-28 Jakub Jelinek <jakub@redhat.com>
4724
4725 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4726
277d7ee0
AK
47272016-06-23 Andi Kleen <ak@linux.intel.com>
4728
4729 * Make-lang.in: Add support for autofdo.
4730
1a4f11c8
DM
47312016-06-22 David Malcolm <dmalcolm@redhat.com>
4732
4733 PR c/70339
4734 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4735 (implicit_decl_warning): When issuing warnings for implicit
4736 declarations, attempt to provide a suggestion via
4737 lookup_name_fuzzy.
4738 (undeclared_variable): Likewise when issuing errors.
4739 (lookup_name_in_scope): Likewise.
4740 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4741 (best_macro_match): New typedef.
4742 (find_closest_macro_cpp_cb): New function.
4743 (lookup_name_fuzzy): New function.
4744 * c-parser.c: Include gcc-rich-location.h.
4745 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4746 (c_keyword_starts_typename): ...this new function.
4747 (c_parser_declaration_or_fndef): When issuing errors about
4748 missing "struct" etc, add a fixit. For other kinds of errors,
4749 attempt to provide a suggestion via lookup_name_fuzzy.
4750 (c_parser_parms_declarator): When looking ahead to detect typos in
4751 type names, also reject CPP_KEYWORD.
4752 (c_parser_parameter_declaration): When issuing errors about
4753 unknown type names, attempt to provide a suggestion via
4754 lookup_name_fuzzy.
4755 * c-tree.h (c_keyword_starts_typename): New prototype.
4756
5a578671
JM
47572016-06-20 Joseph Myers <joseph@codesourcery.com>
4758
4759 PR c/71601
4760 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4761 c_common_type returns error_mark_node.
4762
3f8257db 47632016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4764
4765 PR c/69507
4766 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4767 __alignof__ (expression).
4768
6a3f203c
DM
47692016-06-14 David Malcolm <dmalcolm@redhat.com>
4770
4771 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4772
264757fb
DM
47732016-06-14 David Malcolm <dmalcolm@redhat.com>
4774
4775 * c-typeck.c (build_component_ref): Simplify fixit code by
4776 using gcc_rich_location::add_fixit_misspelled_id.
4777 (set_init_label): Likewise.
4778
f7e4f2e3
DM
47792016-06-13 David Malcolm <dmalcolm@redhat.com>
4780
4781 * c-parser.c (c_parser_initelt): Provide location of name for new
4782 location_t param of set_init_label.
4783 * c-tree.h (set_init_label): Add location_t param.
4784 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4785 param and use it when issuing error messages about unrecognized
4786 field names. Attempt to provide a fixit hint if appropriate,
4787 otherwise update the error message to provide the type name.
4788
4b1ffdb1
TS
47892016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4790
4791 PR c/71381
4792 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4793 Loosen checking.
4794
44a845ca
MS
47952016-06-08 Martin Sebor <msebor@redhat.com>
4796 Jakub Jelinek <jakub@redhat.com>
4797
4798 PR c++/70507
4799 PR c/68120
4800 * c-typeck.c (convert_arguments): Don't promote last argument
4801 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4802
92a5f2ba
MP
48032016-06-08 Marek Polacek <polacek@redhat.com>
4804
4805 PR c/71418
4806 * c-decl.c (grokdeclarator): Check TYPE_P.
4807
08203f73
MP
4808 PR c/71426
4809 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4810 code.
4811
6ffd47b7
DM
48122016-06-07 David Malcolm <dmalcolm@redhat.com>
4813
4814 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4815 and structure element reference, capture the location of the
4816 element name token and pass it to build_component_ref.
4817 (c_parser_postfix_expression_after_primary): Likewise for
4818 structure element dereference.
4819 (c_parser_omp_variable_list): Likewise for
4820 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4821 * c-tree.h (build_component_ref): Add location_t param.
4822 * c-typeck.c (build_component_ref): Add location_t param
4823 COMPONENT_LOC. Use it, if available, when issuing hints about
4824 mispelled member names to provide a fixit replacement hint.
4825
1f40cff3
MP
48262016-06-06 Marek Polacek <polacek@redhat.com>
4827
4828 PR c/71362
4829 * c-parser.c (c_parser_direct_declarator): Set location.
4830
5545a907
MP
48312016-06-06 Marek Polacek <polacek@redhat.com>
4832
4833 * c-typeck.c (comptypes_internal): Handle comparisons of
4834 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4835 TYPE_REF_CAN_ALIAS_ALL.
4836
b605f663
CLT
48372016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4838
4839 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4840 arguments as addressable when async clause exists.
4841
00631022
JJ
48422016-05-30 Jakub Jelinek <jakub@redhat.com>
4843
4844 PR c++/71349
4845 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4846 when combined with target construct.
4847
7211a097
JJ
48482016-05-26 Jakub Jelinek <jakub@redhat.com>
4849
4850 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4851 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4852
95efe6b6
MP
48532016-05-25 Marek Polacek <polacek@redhat.com>
4854
4855 PR c/71265
4856 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4857
a23faf7a
MP
4858 PR c/71266
4859 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4860
e46c7770
CP
48612016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4862
4863 * c-parser.c (c_parser_oacc_declare): Add support for
4864 GOMP_MAP_FIRSTPRIVATE_POINTER.
4865 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4866 argument with enum c_omp_region_type ort.
4867 (handle_omp_array_sections): Likewise. Update call to
4868 handle_omp_array_sections_1.
4869 (c_finish_omp_clauses): Add specific errors and warning messages for
4870 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4871 call to handle_omp_array_sections.
4872
a04e69c0
TS
48732016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4874
4875 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4876
f17a223d
RB
48772016-05-24 Richard Biener <rguenther@suse.de>
4878
4879 PR middle-end/70434
4880 PR c/69504
4881 * c-typeck.c (build_array_ref): Do not complain about indexing
4882 non-lvalue vectors. Adjust for function name change.
4883
79063edd
MS
48842016-05-20 Martin Sebor <msebor@redhat.com>
4885
4886 PR c/71115
4887 * c-typeck.c (error_init): Use
4888 expansion_point_location_if_in_system_header.
4889 (warning_init): Same.
4890
8a40fef3
DM
48912016-05-19 David Malcolm <dmalcolm@redhat.com>
4892
4893 PR c/71171
4894 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4895 in error-handling.
4896 (c_parser_postfix_expression): Likewise.
4897 * c-tree.h (c_expr::set_error): New method.
4898 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4899 that result's range is initialized.
4900
e9892350
JG
49012016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4902
4903 * c-typeck.c (parser_build_unary_op): Fix formatting.
4904
8fad45f5
MW
49052016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4906
4907 * c-decl.c (grokdeclarator): Remove errmsg and use of
4908 targetm.invalid_return_type.
4909 (grokparms): Remove errmsg and use of
4910 targetm.invalid_parameter_type.
4911
aa4b467b
JM
49122016-05-13 Joseph Myers <joseph@codesourcery.com>
4913
4914 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4915 function return type.
4916
4f2e1536
MP
49172016-05-12 Marek Polacek <polacek@redhat.com>
4918
4919 PR c/70756
4920 * c-decl.c (build_compound_literal): Pass LOC down to
4921 c_incomplete_type_error.
4922 * c-tree.h (require_complete_type): Adjust declaration.
4923 (c_incomplete_type_error): Likewise.
4924 * c-typeck.c (require_complete_type): Add location parameter, pass it
4925 down to c_incomplete_type_error.
4926 (c_incomplete_type_error): Add location parameter, pass it down to
4927 error_at.
4928 (build_component_ref): Pass location down to c_incomplete_type_error.
4929 (default_conversion): Pass location down to require_complete_type.
4930 (build_array_ref): Likewise.
4931 (build_function_call_vec): Likewise.
4932 (convert_arguments): Likewise.
4933 (build_unary_op): Likewise.
4934 (build_c_cast): Likewise.
4935 (build_modify_expr): Likewise.
4936 (convert_for_assignment): Likewise.
4937 (c_finish_omp_clauses): Likewise.
4938
d6e83a8d
MM
49392016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4940
4941 PR c/43651
4942 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4943 is enabled.
4944 * c-errors.c (pedwarn_c90): Return true if warned.
4945 * c-tree.h (pedwarn_c90): Change return type to bool.
4946 (enum c_declspec_word): Add new enumerator cdw_atomic.
4947
5c3a10fb
MP
49482016-05-11 Marek Polacek <polacek@redhat.com>
4949
4950 PR c++/71024
4951 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4952 diagnose_mismatched_attributes and call it.
4953
cf68d92c
MP
49542016-05-10 Marek Polacek <polacek@redhat.com>
4955
4956 PR c/70255
4957 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4958 on a declaration following the definition.
4959
351f85c5
JJ
49602016-05-05 Jakub Jelinek <jakub@redhat.com>
4961
4962 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4963 parse it through to c_parser_c99_block_statement.
4964 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4965 caller.
4966
deef7113
MP
49672016-05-04 Marek Polacek <polacek@redhat.com>
4968
4969 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4970 OPT_Wdangling_else.
4971
de55efd5
MP
49722016-05-04 Marek Polacek <polacek@redhat.com>
4973
4974 PR c/48778
4975 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4976 for macro expansions.
4977
79ce98bc
MP
49782016-05-03 Marek Polacek <polacek@redhat.com>
4979
4980 PR c/70859
4981 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4982 check_builtin_function_arguments.
4983
fb2647aa
RB
49842016-05-03 Richard Biener <rguenther@suse.de>
4985
4986 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4987 the checksum from the previous stage.
4988
77886428
CP
49892016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4990
4991 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4992 c_finish_omp_clauses.
4993 (c_parser_omp_all_clauses): Likewise.
4994 (c_parser_oacc_cache): Likewise.
4995 (c_parser_oacc_loop): Likewise.
4996 (omp_split_clauses): Likewise.
4997 (c_parser_omp_declare_target): Likewise.
4998 (c_parser_cilk_all_clauses): Likewise.
4999 (c_parser_cilk_for): Likewise.
5000 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5001 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5002
7176a4a0
MP
50032016-05-02 Marek Polacek <polacek@redhat.com>
5004
5005 PR c/70851
5006 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5007 incomplete type.
5008
e7ff0319
CP
50092016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5010
5011 PR middle-end/70626
5012 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5013 OACC_LOOP_CLAUSE_MASK.
5014 (c_parser_oacc_kernels_parallel): Update call to
5015 c_oacc_split_loop_clauses.
5016
9f405ce1
AM
50172016-04-28 Andrew MacLeod <amacleod@redhat.com>
5018
5019 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5020 argument to build_modify_expr in two cases.
5021
c1e1f433
BS
50222016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5023
5024 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5025 warn_for_memset instead of warning directly here.
5026
2448a956
MP
50272016-04-26 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/67784
5030 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5031 out of ...
5032 (c_parser_for_statement): ... here.
5033 (c_parser_if_statement): Use it.
5034 (c_parser_switch_statement): Use it.
5035 (c_parser_while_statement): Use it.
5036
b02a5e26
MP
5037 PR c/70791
5038 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5039
477d4906
IV
50402016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5041
5042 PR c++/69363
5043 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5044 instead of c_finish_cilk_clauses.
5045 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5046 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5047 floating-point variables in the linear clause for Cilk Plus.
5048
fe37c7af
MM
50492016-04-18 Michael Matz <matz@suse.de>
5050
5051 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5052 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5053
949505a9
MP
50542016-04-15 Marek Polacek <polacek@redhat.com>
5055
5056 PR c/70671
5057 * c-typeck.c (build_unary_op): Pass location down to error and
5058 warning call.
5059
dda1bf61
JJ
50602016-04-15 Jakub Jelinek <jakub@redhat.com>
5061
5062 PR c/70436
5063 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5064 where needed.
5065 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5066 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5067 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5068 Adjust c_parser_pragma callers.
5069 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5070 caller.
5071 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5072 c_parser_statement.
5073 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5074 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5075 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5076 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5077 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5078 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5079 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5080 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5081 down where needed.
5082 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5083 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5084 calls.
5085
99cd9857
MP
50862016-04-13 Marek Polacek <polacek@redhat.com>
5087
5088 PR c/70436
5089 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5090 adjust callers.
5091 (c_parser_statement): Likewise.
5092 (c_parser_c99_block_statement): Likewise.
5093 (c_parser_while_statement): Likewise.
5094 (c_parser_for_statement): Likewise.
5095 (c_parser_if_body): Don't set IF_P here.
5096 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5097 about dangling else here.
5098 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5099 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5100 warn about dangling else here.
5101
f13355da
MP
51022016-04-04 Marek Polacek <polacek@redhat.com>
5103
5104 PR c/70307
5105 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5106
5fde6a45
MP
51072016-03-31 Marek Polacek <polacek@redhat.com>
5108
5109 PR c/70297
5110 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5111
4bbf545b
DM
51122016-03-18 David Malcolm <dmalcolm@redhat.com>
5113
5114 PR c/70281
5115 * c-parser.c (c_parser_postfix_expression): Set the source range
5116 for uses of "__builtin_types_compatible_p".
5117
fcc2b74f
JJ
51182016-03-17 Jakub Jelinek <jakub@redhat.com>
5119
5120 PR c/70280
5121 * c-typeck.c (composite_type): Don't count void_list_node
5122 into len, if the list is terminated by void_list_node, start
5123 with void_list_node instead of NULL for newargs. Stop
5124 at void_list_node.
5125
ab4c578f
MP
51262016-03-16 Marek Polacek <polacek@redhat.com>
5127
5128 PR c/70093
5129 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5130 nested functions returning VM types.
5131
96b3c82d
CP
51322016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5133
5134 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5135 when calling c_finish_omp_clauses.
5136
29b9828f
BS
51372016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5138
5139 PR c/69824
5140 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5141 for later.
5142
7ff6ca38
MP
51432016-03-04 Marek Polacek <polacek@redhat.com>
5144
5145 PR c/69798
5146 * c-parser.c (c_parser_postfix_expression): Call
5147 c_parser_cast_expression rather than c_parser_postfix_expression.
5148
686e2237
JJ
51492016-03-01 Jakub Jelinek <jakub@redhat.com>
5150
5151 PR c/69796
5152 PR c/69974
5153 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5154 of incomplete decls to error_mark_node.
5155
0b05329b
MP
51562016-02-24 Marek Polacek <polacek@redhat.com>
5157
5158 PR c/69819
5159 * c-decl.c (finish_decl): Don't update the copy of the type of a
5160 different decl type.
5161
067fbd8b
JJ
51622016-02-23 Jakub Jelinek <jakub@redhat.com>
5163
5164 PR objc/69844
5165 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5166 in id_kind reclassification.
5167
bf14eba2
JJ
51682016-02-16 Jakub Jelinek <jakub@redhat.com>
5169
5170 PR c/69835
5171 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5172
ba539195
JN
51732016-02-16 James Norris <jnorris@codesourcery.com>
5174
5175 PR c/64748
5176 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5177
16595a1f
BS
51782016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5179
f48dfe98
BS
5180 * c-decl.c (build_null_declspecs): Zero the entire struct.
5181
16595a1f
BS
5182 PR c/69522
5183 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5184 callers changed. If nested_p is true, use it to call
5185 finish_implicit_inits.
5186 * c-tree.h (finish_implicit_inits): Declare.
5187 * c-typeck.c (finish_implicit_inits): New function. Move code
5188 from ...
5189 (push_init_level): ... here.
5190 (set_designator, process_init_element): Call finish_implicit_inits.
5191
66756373
JJ
51922016-02-11 Jakub Jelinek <jakub@redhat.com>
5193
5194 PR c/69768
5195 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5196 arguments for -Waddress warning.
5197
1066e9b5
JJ
51982016-02-04 Jakub Jelinek <jakub@redhat.com>
5199
5200 PR c/69669
5201 * c-decl.c (finish_enum): When honoring mode attribute,
5202 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5203
3a5d2ba4
JJ
52042016-01-29 Jakub Jelinek <jakub@redhat.com>
5205
5206 PR debug/69518
5207 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5208 all type variants, not just TYPE_MAIN_VARIANT.
5209
cbdd8ae0
JJ
52102016-01-27 Jakub Jelinek <jakub@redhat.com>
5211
5212 PR debug/66869
5213 * c-decl.c (c_write_global_declarations_1): Warn with
5214 warn_unused_function if static prototype without definition
5215 is not C_DECL_USED.
5216
fa74a4bc
MP
52172016-01-27 Marek Polacek <polacek@redhat.com>
5218
5219 PR c/68062
5220 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5221 to unsigned, if needed. Add -Wsign-compare warning.
5222
13f92e8d
JJ
52232016-01-26 Jakub Jelinek <jakub@redhat.com>
5224
5225 PR tree-optimization/69483
5226 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5227
cd8e73dc 52282016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5229
5230 PR c/24293
5231 * c-tree.h (incomplete_record_decls): Declare.
5232 * c-parser.c (incomplete_record_decls): Define.
5233 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5234 report error if any decl has zero size.
5235 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5236 or enum type to incomplete_record_decls.
5237
e6d6ec9e
TV
52382016-01-14 Tom de Vries <tom@codesourcery.com>
5239
5240 PR tree-optimization/68773
5241 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5242 set force_output.
5243
00083992
MP
52442016-01-14 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/69262
5247 * c-decl.c (grokdeclarator): Provide more information for invalid
5248 array declarations.
5249
7443cf13
DM
52502016-01-06 David Malcolm <dmalcolm@redhat.com>
5251
5252 * c-parser.c (c_parser_unary_expression): For dereferences, build
5253 a combined location before calling build_indirect_ref, so that
5254 error reports cover the full range, manually updating the c_expr
5255 src_range.
5256
6b131d5b
MP
52572016-01-06 Marek Polacek <polacek@redhat.com>
5258
5259 PR sanitizer/69099
5260 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5261 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5262 NULL.
5263
818ab71a
JJ
52642016-01-04 Jakub Jelinek <jakub@redhat.com>
5265
5266 Update copyright years.
5267
2fe0a208
MP
52682016-01-04 Marek Polacek <polacek@redhat.com>
5269
5270 PR c/68908
5271 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5272 optimization to use __atomic_fetch_* built-in if possible.
5273
c7b48c8a
TS
52742015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5275
5276 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5277 into...
5278 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5279 all users.
5280
fda5652f
MP
52812015-12-22 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/69002
5284 * c-typeck.c (build_component_ref): Warn when acessing elements of
5285 atomic structures or unions.
5286
745e411d
DM
52872015-12-21 David Malcolm <dmalcolm@redhat.com>
5288
5289 * c-typeck.c: Include "gcc-rich-location.h".
5290 (build_binary_op): In the two places that call binary_op_error,
5291 create a gcc_rich_location and populate it with the location of
5292 the binary op and its two operands.
5293
94c40e19
DM
52942015-12-16 David Malcolm <dmalcolm@redhat.com>
5295
5296 * c-parser.c (c_parser_statement_after_labels): When calling
5297 c_finish_return, Use the return expression's location if it has
5298 one, falling back to the location of the first token within it.
5299 * c-typeck.c (c_finish_return): When issuing warnings about
5300 the incorrect presence/absence of a return value, issue a note
5301 showing the declaration of the function.
5302
de67c4c3
DM
53032015-12-16 David Malcolm <dmalcolm@redhat.com>
5304
5305 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5306 to 4.
5307 (c_parser_peek_nth_token): New function.
5308 (c_parser_peek_conflict_marker): New function.
5309 (c_parser_error): Detect conflict markers and report them as such.
5310
a10704e1
DM
53112015-12-16 David Malcolm <dmalcolm@redhat.com>
5312
5313 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5314 to preserve range information for the primary expression
5315 in the call to c_parser_postfix_expression_after_primary.
5316
8062bca6
DM
53172015-12-16 David Malcolm <dmalcolm@redhat.com>
5318
5319 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5320 expression location, falling back on the first token location,
5321 rather than always using the latter.
5322
d06f8b75
MP
53232015-12-16 Marek Polacek <polacek@redhat.com>
5324
5325 PR c/64637
5326 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5327 available.
5328
2994fb91
MP
53292015-12-15 Marek Polacek <polacek@redhat.com>
5330
5331 PR c/68907
5332 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5333 artificial decl.
5334
a1b93f8d
DM
53352015-12-08 David Malcolm <dmalcolm@redhat.com>
5336
5337 * c-parser.c (c_parser_alignof_expression): Capture location of
5338 closing parenthesis (if any), or of end of unary expression, and
5339 use it to build a src_range for the expression.
5340
46c6e1e2
DM
53412015-12-08 David Malcolm <dmalcolm@redhat.com>
5342
5343 PR c/68757
5344 * c-parser.c (c_parser_get_builtin_args): Add
5345 "out_close_paren_loc" param, and write back to it.
5346 (c_parser_postfix_expression): Capture the closing
5347 parenthesis location for RID_CHOOSE_EXPR,
5348 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5349 RID_BUILTIN_SHUFFLE and use it to set the source range
5350 for such expressions; within RID_BUILTIN_COMPLEX set
5351 the underlying location.
5352
66189108
MP
53532015-12-07 Marek Polacek <polacek@redhat.com>
5354
5355 PR c/68668
5356 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5357 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5358
f187980b
EB
53592015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5360
5361 * c-tree.h (c_build_va_arg): Adjust prototype.
5362 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5363 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5364 parameter, adjust throughout and issue an error if EXPR is a component
5365 with reverse storage order.
5366
4250754e
JM
53672015-12-02 Jason Merrill <jason@redhat.com>
5368
5369 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5370 (c_fully_fold_internal, decl_constant_value_for_optimization):
5371 Move from c-common.c.
5372 * c-tree.h: Declare decl_constant_value_for_optimization.
5373 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5374
e9e32ee6
JM
53752015-12-02 Joseph Myers <joseph@codesourcery.com>
5376
5377 PR c/68162
5378 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5379 following link from declarator to next declarator. Track original
5380 qualified type and pass it to c_build_qualified_type.
5381 * c-typeck.c (c_build_qualified_type): Add arguments
5382 orig_qual_type and orig_qual_indirect.
5383
ff7a55bf
TS
53842015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5385
5386 * c-parser.c (c_parser_omp_clause_name)
5387 (c_parser_oacc_all_clauses): Alphabetical sorting.
5388
657e4e47
JJ
53892015-12-02 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR c/68533
5392 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5393 for diagnostics.
5394
37d5ad46
JB
53952015-12-01 Julian Brown <julian@codesourcery.com>
5396 Cesar Philippidis <cesar@codesourcery.com>
5397 James Norris <James_Norris@mentor.com>
5398
5399 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5400 (c_parser_oacc_clause_use_device): New function.
5401 (c_parser_oacc_all_clauses): Add use_device support.
5402 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5403 (c_parser_oacc_host_data): New function.
5404 (c_parser_omp_construct): Add host_data support.
5405 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5406 * c-typeck.c (c_finish_oacc_host_data): New function.
5407 (c_finish_omp_clauses): Add use_device support.
5408
a4850ce9
JH
54092015-11-29 Jan Hubicka <hubicka@ucw.cz>
5410
5411 PR c/67106
5412 * c-decl.c: Set TYPE_PACKED in variants.
5413
b58d3df2
ML
54142015-11-27 Martin Liska <mliska@suse.cz>
5415
5416 PR c++/68312
5417 * c-array-notation.c (fix_builtin_array_notation_fn):
5418 Use release_vec_vec instead of vec::release.
5419 (build_array_notation_expr): Likewise.
5420 (fix_conditional_array_notations_1): Likewise.
5421 (fix_array_notation_expr): Likewise.
5422 (fix_array_notation_call_expr): Likewise.
5423
aec17bfe
JJ
54242015-11-27 Jakub Jelinek <jakub@redhat.com>
5425
5426 PR c/63326
5427 * c-parser.c (c_parser_compound_statement_nostart): If
5428 last_label is true, use pragma_stmt instead of pragma_compound
5429 as second c_parser_pragma argument.
5430 (c_parser_omp_ordered, c_parser_omp_target_update,
5431 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5432 false as second argument to c_parser_skip_to_pragma_eol after
5433 diagnosing standalone directives used in pragma_stmt context.
5434
688c4de0
IV
54352015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5436
5437 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5438 with "if (ENABLE_OFFLOADING)".
5439
cbd03aee
DM
54402015-11-23 David Malcolm <dmalcolm@redhat.com>
5441
5442 PR objc/68438
5443 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5444 for various Objective-C constructs: Class.name syntax,
5445 @selector(), @protocol(), @encode(), and [] message syntax.
5446
a87a86e1
DM
54472015-11-20 David Malcolm <dmalcolm@redhat.com>
5448
5449 PR 62314
5450 * c-typeck.c (should_suggest_deref_p): New function.
5451 (build_component_ref): Special-case POINTER_TYPE when
5452 generating a "not a structure of union" error message, and
5453 suggest a "->" rather than a ".", providing a fix-it hint.
5454
8ece8dfb
DM
54552015-11-19 David Malcolm <dmalcolm@redhat.com>
5456
5457 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5458 candidate into a new function, find_closest_identifier.
5459
433068cc
MP
54602015-11-19 Marek Polacek <polacek@redhat.com>
5461
5462 PR c/68412
5463 * c-typeck.c (parser_build_binary_op): Properly handle
5464 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5465
bef08b71
DM
54662015-11-17 David Malcolm <dmalcolm@redhat.com>
5467
5468 * c-parser.c (set_c_expr_source_range): Bulletproof both
5469 overloaded implementations against NULL expr->value.
5470 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5471 values.
5472 (c_parser_unary_expression): Likewise when handling addresses of
5473 labels.
5474 (c_parser_postfix_expression): Likewise for statement expressions,
5475 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5476 __builtin_va_arg, and for __builtin_offset_of.
5477 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5478 src_range using the range of the braced initializer.
5479 (c_parser_transaction_expression): Set src_range for "ret" to a
5480 sane pair of values.
5481
fff77217
KY
54822015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5483
5484 * c-parser.c (c_finish_omp_declare_simd): Look for
5485 "simd" attribute as well. Update error message.
5486
1d899da2
TS
54872015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5488
5489 * c-parser.c (c_parser_omp_declare_target): Adjust.
5490
e4606348
JJ
54912015-11-14 Jakub Jelinek <jakub@redhat.com>
5492
5493 * c-typeck.c (c_finish_omp_clauses): Don't mark
5494 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5495
3e636daf
MP
54962015-11-14 Marek Polacek <polacek@redhat.com>
5497
5498 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5499 * c-typeck.c: Likewise.
5500
ebedc9a3
DM
55012015-11-13 David Malcolm <dmalcolm@redhat.com>
5502
5503 * c-decl.c (warn_defaults_to): Pass line_table to
5504 rich_location ctor.
5505 * c-errors.c (pedwarn_c99): Likewise.
5506 (pedwarn_c90): Likewise.
5507 * c-parser.c (set_c_expr_source_range): New functions.
5508 (c_token::get_range): New method.
5509 (c_token::get_finish): New method.
5510 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5511 based on the range from the start of the LHS to the end of the
5512 RHS.
5513 (c_parser_conditional_expression): Likewise, based on the range
5514 from the start of the cond.value to the end of exp2.value.
5515 (c_parser_binary_expression): Call set_c_expr_source_range on
5516 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5517 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5518 based on the cast_loc through to the end of the expr.
5519 (c_parser_unary_expression): Likewise, based on the
5520 op_loc through to the end of op.
5521 (c_parser_sizeof_expression) Likewise, based on the start of the
5522 sizeof token through to either the closing paren or the end of
5523 expr.
5524 (c_parser_postfix_expression): Likewise, using the token range,
5525 or from the open paren through to the close paren for
5526 parenthesized expressions.
5527 (c_parser_postfix_expression_after_primary): Likewise, for
5528 various kinds of expression.
5529 * c-tree.h (struct c_expr): Add field "src_range".
5530 (c_expr::get_start): New method.
5531 (c_expr::get_finish): New method.
5532 (set_c_expr_source_range): New decls.
5533 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5534 on ret for prefix unary ops.
5535 (parser_build_binary_op): Likewise, running from the start of
5536 arg1.value through to the end of arg2.value.
5537
ec8b536f
MP
55382015-11-13 Marek Polacek <polacek@redhat.com>
5539
5540 PR c/68320
5541 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5542
277fe616
DM
55432015-11-13 David Malcolm <dmalcolm@redhat.com>
5544
5545 * c-typeck.c: Include spellcheck.h.
5546 (lookup_field_fuzzy_find_candidates): New function.
5547 (lookup_field_fuzzy): New function.
5548 (build_component_ref): If the field was not found, try using
5549 lookup_field_fuzzy and potentially offer a suggestion.
5550
6e232ba4
JN
55512015-11-12 James Norris <jnorris@codesourcery.com>
5552 Joseph Myers <joseph@codesourcery.com>
5553
5554 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5555 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5556 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5557 and PRAGMA_OMP_CLAUSE_LINK.
5558 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5559 and PRAGMA_OACC_CLAUSE_LINK.
5560 (OACC_DECLARE_CLAUSE_MASK): New definition.
5561 (c_parser_oacc_declare): New function.
5562
9be4f715
MP
55632015-11-12 Marek Polacek <polacek@redhat.com>
5564
5565 PR c/67784
5566 * c-parser.c (c_parser_for_statement): Reclassify the token in
5567 a correct scope.
5568
e78bede6
MP
55692015-11-11 Marek Polacek <polacek@redhat.com>
5570
5571 PR c/68107
5572 PR c++/68266
5573 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5574 checking the size of an array.
5575
69f293c9
AM
55762015-11-11 Andrew MacLeod <amacleod@redhat.com>
5577
5578 * c-array-notation.c: Remove unused header files.
5579 * c-aux-info.c: Likewise.
5580 * c-convert.c: Likewise.
5581 * c-decl.c: Likewise.
5582 * c-errors.c: Likewise.
5583 * c-lang.c: Likewise.
5584 * c-objc-common.c: Likewise.
5585 * c-parser.c: Likewise.
5586 * c-typeck.c: Likewise.
5587 * gccspec.c: Likewise.
5588
3a40d81d
NS
55892015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5590 Cesar Philippidis <cesar@codesourcery.com>
5591 James Norris <jnorris@codesourcery.com>
5592 Julian Brown <julian@codesourcery.com>
5593 Nathan Sidwell <nathan@codesourcery.com>
5594
3a40d81d
NS
5595 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5596 routine arg.
5597 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5598 (c_parser_pragma): Parse 'acc routine'.
5599 (OACC_ROUTINE_CLAUSE_MARK): Define.
5600 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5601
fc402eec
AA
56022015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5603
5604 PR debug/67192
5605 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5606 location of the backward-goto to the start of the loop body.
5607
f6b0b3db
AA
56082015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5609
5610 PR debug/67192
5611 * c-parser.c (c_parser_while_statement): Finish the loop before
5612 parsing ahead for misleading indentation.
5613 (c_parser_for_statement): Likewise.
5614
ee45a32d
EB
56152015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5616
5617 * c-decl.c (finish_struct): If the structure has reverse storage
5618 order, rewrite the type of array fields with scalar component. Call
5619 maybe_apply_pragma_scalar_storage_order on entry.
5620 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5621 errors on bit-fields and reverse SSO here and not...
5622 (c_mark_addressable): ...here.
5623 (output_init_element): Adjust call to initializer_constant_valid_p.
5624 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5625
8a645150
DM
56262015-11-06 David Malcolm <dmalcolm@redhat.com>
5627
5628 * c-decl.c (warn_defaults_to): Update for change in signature
5629 of diagnostic_set_info.
5630 * c-errors.c (pedwarn_c99): Likewise.
5631 (pedwarn_c90): Likewise.
5632 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5633 for textinfo::set_location.
5634
7a5e4956
CP
56352015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5636 Thomas Schwinge <thomas@codesourcery.com>
5637 James Norris <jnorris@codesourcery.com>
5638
5639 * c-parser.c (c_parser_omp_clause_name): Add support for
5640 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5641 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5642 default(none) in OpenACC.
5643 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5644 arguments.
5645 (c_parser_oacc_clause_tile): New function.
5646 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5647 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5648 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5649 TILE}.
5650 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5651 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5652 FIRSTPRIVATE}.
5653 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5654 (c_parser_oacc_update): Update the error message for missing clauses.
5655 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5656 and OMP_CLAUSE_INDEPENDENT.
5657
bfcfbfa0
MP
56582015-11-05 Marek Polacek <polacek@redhat.com>
5659
5660 PR c/68090
5661 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5662 deal with pre-evaluation on invalid types.
5663
e01d41e5
JJ
56642015-11-05 Jakub Jelinek <jakub@redhat.com>
5665 Ilya Verbin <ilya.verbin@intel.com>
5666
5667 * c-parser.c: Include context.h and gimple-expr.h.
5668 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5669 monotonic together with nonmonotonic.
5670 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5671 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5672 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5673 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5674 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5675 expressions on combined target teams before the target.
5676 (c_parser_omp_declare_target): If decl has "omp declare target" or
5677 "omp declare target link" attribute, and cgraph or varpool node already
5678 exists, then set corresponding flags. Call c_finish_omp_clauses
5679 in the parenthesized extended-list syntax case.
5680 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5681 declare target.
5682 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5683 on OMP_CLAUSE_REDUCTION array sections.
5684 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5685 into the constant offset, or for variable low-bound using
5686 POINTER_PLUS_EXPR. For structure element based array sections use
5687 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5688 (c_finish_omp_clauses): Drop generic_field_head, structure
5689 elements are now always mapped even as array section bases,
5690 diagnose same var in data sharing and mapping clauses. Diagnose if
5691 linear step on declare simd is neither a constant nor a uniform
5692 parameter. Look through POINTER_PLUS_EXPR for array section
5693 reductions. Diagnose the same var or function appearing multiple
5694 times on the same directive. Fix up wording for the to clause if t
5695 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5696 modifier on kinds other than dynamic or guided or nonmonotonic
5697 modifier together with ordered clause.
5698
4bf9e5a8
TS
56992015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5700 Chung-Lin Tang <cltang@codesourcery.com>
5701
5702 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5703
2adfab87
AM
57042015-10-29 Andrew MacLeod <amacleod@redhat.com>
5705
5706 * c-array-notation.c: Reorder #include's and remove duplicates.
5707 * c-aux-info.c: Likewise.
5708 * c-convert.c: Likewise.
5709 * c-decl.c: Likewise.
5710 * c-errors.c: Likewise.
5711 * c-lang.c: Likewise.
5712 * c-objc-common.c: Likewise.
5713 * c-parser.c: Likewise.
5714 * c-typeck.c: Likewise.
5715
e922069e
JW
57162015-10-26 Jim Wilson <jim.wilson@linaro.org>
5717
5718 PR debug/66068
5719 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5720 after calling build_qualified_type.
5721
765dd391
CP
57222015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5723 Thomas Schwinge <thomas@codesourcery.com>
5724 James Norris <jnorris@codesourcery.com>
5725 Joseph Myers <joseph@codesourcery.com>
5726 Julian Brown <julian@codesourcery.com>
5727 Bernd Schmidt <bschmidt@redhat.com>
5728
5729 * c-parser.c (c_parser_oacc_shape_clause): New.
5730 (c_parser_oacc_simple_clause): New.
5731 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5732 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5733
88bae6f4
TS
57342015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5735 James Norris <jnorris@codesourcery.com>
5736 Cesar Philippidis <cesar@codesourcery.com>
5737
5738 PR c/64765
5739 PR c/64880
5740 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5741 parameters, and handle these. Adjust all users.
5742 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5743 into...
5744 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5745 all users.
5746 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5747 declare functions.
5748 (c_finish_omp_construct): Declare function.
5749 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5750 Merge functions into...
5751 (c_finish_omp_construct): ... this new function.
5752
a8fc2579
RB
57532015-10-22 Richard Biener <rguenther@suse.de>
5754
5755 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5756 before folding a MINUS_EXPR.
5757
e9122ef6
MP
57582015-10-21 Marek Polacek <polacek@redhat.com>
5759
5760 PR c/68024
5761 * c-decl.c (start_function): Warn about vararg functions without
5762 a prototype.
5763
9f47c7e5
IE
57642015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5765
5766 * c-typeck.c (build_conditional_expr): Use boolean vector
5767 type for vector comparison.
5768 (build_vec_cmp): New.
5769 (build_binary_op): Use build_vec_cmp for comparison.
5770
fa60eeb9
MP
57712015-10-20 Marek Polacek <polacek@redhat.com>
5772
5773 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5774
2c7020eb
MP
57752015-10-20 Marek Polacek <polacek@redhat.com>
5776
5777 PR c/67964
5778 * c-parser.c (c_parser_attributes): Break out of the loop if the
5779 token after an attribute isn't a comma.
5780
d9a6bd32
JJ
57812015-10-13 Jakub Jelinek <jakub@redhat.com>
5782 Aldy Hernandez <aldyh@redhat.com>
5783
5784 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5785 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5786 (c_parser_omp_variable_list): Handle structure elements for
5787 map, to and from clauses. Handle array sections in reduction
5788 clause. Formatting fixes.
5789 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5790 if clause modifiers.
5791 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5792 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5793 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5794 c_parser_omp_clause_is_device_ptr): New functions.
5795 (c_parser_omp_clause_ordered): Parse optional parameter.
5796 (c_parser_omp_clause_reduction): Handle array reductions.
5797 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5798 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5799 functions.
5800 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5801 (c_parser_omp_clause_depend_sink): New function.
5802 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5803 (c_parser_omp_clause_map): Parse release/delete map kinds and
5804 optional always modifier.
5805 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5806 and c_finish_omp_clauses callers.
5807 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5808 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5809 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5810 (OMP_CRITICAL_CLAUSE_MASK): Define.
5811 (c_parser_omp_critical): Parse critical clauses.
5812 (c_parser_omp_for_loop): Handle doacross loops, adjust
5813 c_finish_omp_for and c_finish_omp_clauses callers.
5814 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5815 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5816 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5817 (c_parser_omp_for): Disallow ordered clause when combined with
5818 distribute. Disallow linear clause when combined with distribute
5819 and not combined with simd.
5820 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5821 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5822 parse clauses and if depend clause is found, don't parse a body.
5823 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5824 Allow target parallel without for after it.
5825 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5826 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5827 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5828 invalid kinds.
5829 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5830 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5831 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5832 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5833 functions.
5834 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5835 defaultmap and is_device_ptr clauses.
5836 (c_parser_omp_target): Parse target parallel and target simd. Set
5837 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5838 and target exit data. Diagnose invalid map kinds.
5839 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5840 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5841 construct.
5842 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5843 &omp_priv.
5844 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5845 (c_parser_omp_taskloop): New function.
5846 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5847 handle PRAGMA_OMP_TASKLOOP.
5848 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5849 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5850 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5851 Add IS_OMP argument, handle structure element bases, diagnose
5852 bitfields, pass IS_OMP recursively, diagnose known zero length
5853 array sections in depend clauses, handle array sections in reduction
5854 clause, diagnose negative length even for pointers.
5855 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5856 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5857 array sections in reduction clause, set
5858 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5859 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5860 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5861 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5862
21ba0cea
MP
58632015-10-06 Marek Polacek <polacek@redhat.com>
5864
5865 * c-parser.c (c_parser_statement_after_labels): Use
5866 protected_set_expr_location.
5867 (c_parser_omp_clause_num_gangs): Likewise.
5868 (c_parser_omp_clause_num_threads): Likewise.
5869 (c_parser_omp_clause_num_workers): Likewise.
5870 (c_parser_omp_clause_vector_length): Likewise.
5871 (c_parser_omp_clause_num_teams): Likewise.
5872 (c_parser_omp_clause_thread_limit): Likewise.
5873 * c-typeck.c (build_c_cast): Likewise.
5874 (c_cast_expr): Likewise.
5875
624d31fe
RS
58762015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5877
5878 * c-typeck.c (c_tree_equal): Use real_equal instead of
5879 REAL_VALUES_EQUAL.
5880
b8fd7909
JM
58812015-10-04 Jason Merrill <jason@redhat.com>
5882
5883 * c-parser.c (c_lex_one_token): Handle @synchronized.
5884 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5885 can change whether the function is transaction_safe.
5886
1c7485af
MP
58872015-10-02 Marek Polacek <polacek@redhat.com>
5888
5889 PR c/67730
5890 * c-typeck.c (convert_for_assignment): Use the expansion point
5891 location throughout.
5892
3e3b8d63
MP
58932015-10-02 Marek Polacek <polacek@redhat.com>
5894
5895 PR c/64249
5896 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5897 and pass it down to c_parser_if_statement.
5898 (c_parser_else_body): Add CHAIN parameter and pass it down to
5899 c_parser_statement_after_labels.
5900 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5901 duplicated if-else-if conditions.
5902
aabef2de
MP
59032015-10-01 Marek Polacek <polacek@redhat.com>
5904
5905 * c-typeck.c (convert_for_assignment): Improve commentary.
5906
de8ddd5f
MP
59072015-09-30 Marek Polacek <polacek@redhat.com>
5908
5909 PR c/67730
5910 * c-typeck.c (c_finish_return): Use the expansion point location for
5911 certain "return with value" warnings.
5912
c4914de6
MLI
59132015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5914
5915 * c-parser.c (pragma_lex): Add loc argument.
5916
0e36f5c7
MP
59172015-09-15 Marek Polacek <polacek@redhat.com>
5918
5919 PR c/67580
5920 * c-decl.c (tag_exists_p): New function.
5921 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5922 struct/union/enum keywords are missing.
5923 * c-tree.h (tag_exists_p): Declare.
5924
2f3bb934
MP
59252015-09-15 Marek Polacek <polacek@redhat.com>
5926
5927 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5928 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5929 Return NULL_TREE instead of 0.
5930 (lookup_name): Return NULL_TREE instead of 0.
5931 (lookup_name_in_scope): Likewise.
5932 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5933 (parser_xref_tag): Use false instead of 0.
5934 (start_struct): Use true instead of 1.
5935 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5936
aa256c4a
MP
59372015-09-14 Marek Polacek <polacek@redhat.com>
5938
5939 * c-typeck.c (set_nonincremental_init_from_string): Use
5940 HOST_WIDE_INT_M1U when shifting a negative value.
5941
dbb68221
MW
59422015-09-09 Mark Wielaard <mjw@redhat.com>
5943
5944 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5945 parm against NULL.
5946
a8a098ac
JJ
59472015-09-10 Jakub Jelinek <jakub@redhat.com>
5948
5949 PR c/67502
5950 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5951 into OMP_FOR_PRE_BODY rather than before the loop.
5952
f4b189d5
JJ
59532015-09-09 Jakub Jelinek <jakub@redhat.com>
5954
0bb99c11
JJ
5955 PR c/67501
5956 * c-parser.c (c_parser_oacc_all_clauses,
5957 c_parser_omp_all_clauses): Remove invalid clause from
5958 list of clauses even if parser->error is set.
5959
fce5e5e3
JJ
5960 PR c/67500
5961 * c-parser.c (c_parser_omp_clause_aligned,
5962 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5963 test for errors.
5964 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5965 error_mark_node.
5966
f4b189d5
JJ
5967 PR c/67495
5968 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5969 instead of c_parser_unary_expression. If the result is !lvalue_p,
5970 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5971
b2aaf235
MP
59722015-09-04 Marek Polacek <polacek@redhat.com>
5973
5974 PR sanitizer/67279
5975 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5976
1807ffc1
MS
59772015-09-03 Martin Sebor <msebor@redhat.com>
5978
5979 PR c/66516
8b652e65
JJ
5980 * c-typeck.c (convert_arguments, parser_build_unary_op,
5981 build_conditional_expr, c_cast_expr, convert_for_assignment,
5982 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5983 reject_gcc_builtin.
5984 (c_decl_implicit): Define.
5985
d04ff417
MP
59862015-09-02 Marek Polacek <polacek@redhat.com>
5987
5988 PR c/67432
5989 * c-parser.c (c_parser_enum_specifier): Give a better error for
5990 an empty enum.
5991
a79683d5
TS
59922015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5993
5994 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5995
191a6b94
MP
59962015-08-12 Marek Polacek <polacek@redhat.com>
5997
5998 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5999 LOC to it.
6000
420a9d9b
MP
60012015-08-03 Marek Polacek <polacek@redhat.com>
6002
6003 PR c/67088
6004 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6005 Use it.
6006 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6007
992118a1
PP
60082015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6009
6010 * c-parser.c (c_parser_if_body): Take token_indent_info
6011 argument. Call warn_for_misleading_indentation even when the
6012 body is a semicolon. Extract token_indent_infos corresponding
6013 to the guard, body and next tokens. Adjust call to
6014 warn_for_misleading_indentation accordingly.
6015 (c_parser_else_body): Likewise.
6016 (c_parser_if_statement): Likewise.
6017 (c_parser_while_statement): Likewise.
6018 (c_parser_for_statement): Likewise.
6019
46308474
LFSM
60202015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6021 Manuel López-Ibáñez <manu@gcc.gnu.org>
6022
6023 * c-decl.c (get_parm_info): Remove static var. Update warning
6024 message.
6025
05b28fd6
MP
60262015-07-27 Marek Polacek <polacek@redhat.com>
6027
6028 PR c++/66555
6029 PR c/54979
6030 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6031
451b5e48
MP
60322015-07-20 Marek Polacek <polacek@redhat.com>
6033
6034 PR c++/55095
6035 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6036 (build_binary_op): Warn about left shift overflows.
6037
1916bcb5
AM
60382015-07-09 Andrew MacLeod <amacleod@redhat.com>
6039
6040 * c-array-notation.c: Adjust includes for flags.h changes.
6041 * c-objc-common.c: Likewise.
6042
c7131fb2
AM
60432015-07-07 Andrew MacLeod <amacleod@redhat.com>
6044
6045 * c-array-notation.c: Adjust includes.
6046 * c-aux-info.c: Likewise.
6047 * c-convert.c: Likewise.
6048 * c-decl.c: Likewise.
6049 * c-errors.c: Likewise.
6050 * c-lang.c: Likewise.
6051 * c-objc-common.c: Likewise.
6052 * c-parser.c: Likewise.
6053 * c-typeck.c: Likewise.
6054
da2e71c9
MLI
60552015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6056
6057 PR fortran/66605
6058 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6059
b155cfd9
MP
60602015-06-29 Marek Polacek <polacek@redhat.com>
6061
6062 PR c/66322
6063 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6064 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6065 about -Wswitch-bool here.
6066 (do_case): Update c_add_case_label call.
6067 (c_finish_case): Update c_do_switch_warnings call.
6068
31521951
MP
60692015-06-27 Marek Polacek <polacek@redhat.com>
6070
6071 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6072
22d03525
MP
60732015-06-26 Marek Polacek <polacek@redhat.com>
6074
6075 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6076 INDIRECT_REF_P.
6077 * c-typeck.c (array_to_pointer_conversion): Likewise.
6078 (build_unary_op): Likewise.
6079 (c_finish_return): Likewise.
6080
f0889939
AM
60812015-06-25 Andrew MacLeod <amacleod@redhat.com>
6082
6083 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6084 * c-parser.c: Likewise.
6085
8d67ee55
RS
60862015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6087
6088 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6089 instead of pointer_hash.
6090 (detect_field_duplicates): Likewise.
6091
0ae9bd27
MP
60922015-06-25 Marek Polacek <polacek@redhat.com>
6093
6094 * c-array-notation.c: Use VAR_P throughout.
6095 * c-decl.c: Likewise.
6096 * c-objc-common.c: Likewise.
6097 * c-parser.c: Likewise.
6098 * c-typeck.c: Likewise.
6099
62f9079a
MP
61002015-06-25 Marek Polacek <polacek@redhat.com>
6101
6102 * c-decl.c: Use is_global_var throughout.
6103 * c-parser.c: Likewise.
6104 * c-typeck.c: Likewise.
6105
abb226c9
AM
61062015-06-17 Andrew MacLeod <amacleod@redhat.com>
6107
6108 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
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-objc-common.c: Likewise.
6115 * c-parser.c: Likewise.
6116 * c-typeck.c: Likewise.
6117
8cbababc
JH
61182015-06-11 Jan Hubicka <hubicka@ucw.cz>
6119
6120 PR middle-end/66325
6121 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6122 variants.
6123
a0349665
PMR
61242015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6125
6126 * c-decl.c (pop_scope): Register the main translation unit
6127 through the new debug hook.
6128
13fdf2e2
AM
61292015-06-08 Andrew MacLeod <amacleod@redhat.com>
6130
6131 * c-array-notation.c : Adjust include files.
6132 * c-aux-info.c : Likewise.
6133 * c-convert.c : Likewise.
6134 * c-decl.c : Likewise.
6135 * c-errors.c : Likewise.
6136 * c-lang.c : Likewise.
6137 * c-lang.h : Likewise.
6138 * c-objc-common.c : Likewise.
6139 * c-parser.c : Likewise.
6140 * c-typeck.c : Likewise.
6141
d7438551
AH
61422015-06-05 Aldy Hernandez <aldyh@redhat.com>
6143
6144 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6145 immediately clobber it.
6146 (c_write_global_declarations_1): Remove call to
6147 check_global_declaration_1.
6148 (c_write_global_declarations_2): Remove.
6149 (c_write_final_cleanups): Rename from c_write_global_declarations.
6150 Remove call to finalize_compilation_unit.
6151 Remove calls to debugging hooks.
6152 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6153 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6154 * c-tree.h: Remove c_write_global_declarations.
6155
ecb9f223
AM
61562015-06-04 Andrew MacLeod <amacleod@redhat.com>
6157
6158 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6159 * c-aux-info.c: Likewise.
6160 * c-convert.c: Likewise.
6161 * c-decl.c: Likewise.
6162 * c-errors.c: Likewise.
6163 * c-lang.c: Likewise.
6164 * c-objc-common.c: Likewise.
6165 * c-parser.c: Likewise.
6166 * c-typeck.c: Likewise.
6167
9482b620
MP
61682015-06-04 Marek Polacek <polacek@redhat.com>
6169
6170 PR c/66341
6171 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6172 it is a lvalue.
6173
bc51ace3
PK
61742015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6175
6176 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6177 Warn for empty struct.
6178 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6179
ea5b45b6
AT
61802015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6181
6182 * c-decl.c (start_function): Call plugin before parsing.
6183 (finish_function): Call plugin after parsing.
6184
c2d47482
PK
61852015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6186
6187 PR c/49551
6188 * c-decl.c (merge_decls): Merge DECL_COMMON.
6189
a95492ab
JW
61902015-05-22 Jim Wilson <jim.wilson@linaro.org>
6191
6192 * Make-lang.in (check_gcc_pallelize): Define.
6193
fd5c817a
MP
61942015-05-22 Marek Polacek <polacek@redhat.com>
6195
6196 PR c/47043
6197 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6198 attributes.
6199
c7b70a3c
MP
62002015-05-21 Marek Polacek <polacek@redhat.com>
6201
6202 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6203 DECL_BUILT_IN.
6204
21b634ae
MP
62052015-05-20 Marek Polacek <polacek@redhat.com>
6206
6207 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6208 * c-typeck.c: Likewise.
6209
296a8c2f
MP
62102015-05-19 Marek Polacek <polacek@redhat.com>
6211
6212 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6213
41b37d5e
JJ
62142015-05-19 Jakub Jelinek <jakub@redhat.com>
6215
6216 PR middle-end/66199
6217 * c-parser.c (c_parser_omp_for_loop): Don't add
6218 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6219 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6220 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6221 constructs.
6222
fab27f52
MM
62232015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6224
6225 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6226 swaps.
fab27f52 6227
40de31cf
MLI
62282015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6229
6230 PR fortran/44054
6231 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6232 accessor function.
6233
3aa3c9fc
MP
62342015-05-14 Marek Polacek <polacek@redhat.com>
6235
6236 PR c/66066
6237 PR c/66127
6238 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6239 rather than with 0.
6240
c3388e62
DM
62412015-05-12 David Malcolm <dmalcolm@redhat.com>
6242
6243 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6244 to add a call to warn_for_misleading_indentation.
6245 (c_parser_else_body): Likewise, adding param "else_loc".
6246 (c_parser_if_statement): Check for misleading indentation.
6247 (c_parser_while_statement): Likewise.
6248 (c_parser_for_statement): Likewise.
6249
755e528f
MP
62502015-05-08 Marek Polacek <polacek@redhat.com>
6251
6252 PR c/64918
6253 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6254 (output_init_element): Likewise.
6255
0173bd2a
MP
62562015-05-07 Marek Polacek <polacek@redhat.com>
6257
6258 PR c/65179
6259 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6260 value.
6261
9babc352
MP
62622015-04-30 Marek Polacek <polacek@redhat.com>
6263
6264 * c-typeck.c (set_init_label): Call error_at instead of error and
6265 pass LOC to it.
6266
ac9f18db
MP
6267 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6268 the type of a decl.
6269
ec3fba51
MP
6270 * c-typeck.c (c_build_va_arg): Clarify the error message.
6271
b811915d
TS
62722015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6273
6274 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6275 OMP_STANDALONE_CLAUSES.
6276
f3075008
MP
62772015-04-28 Marek Polacek <polacek@redhat.com>
6278
6279 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6280
4e81b788
MP
62812015-04-28 Marek Polacek <polacek@redhat.com>
6282
6283 PR c/65901
6284 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6285
6c1db78e
MP
62862015-04-25 Marek Polacek <polacek@redhat.com>
6287
6288 PR c/52085
6289 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6290 attribute.
6291
5c4abbb8
MP
62922015-04-23 Marek Polacek <polacek@redhat.com>
6293
6294 PR c/65345
6295 * c-decl.c (set_labels_context_r): New function.
6296 (store_parm_decls): Call it via walk_tree_without_duplicates.
6297 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6298 instead of create_tmp_var. Build TARGET_EXPR instead of
6299 COMPOUND_EXPR.
6300 (build_atomic_assign): Use create_tmp_var_raw instead of
6301 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6302
06aca1d5
IV
63032015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6304
6305 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6306 (c_parser_omp_target_update): Add missed %> to error_at ().
6307
8fba1830
BRF
63082015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6309
6310 PR target/55143
6311 * c-decl.c (c_default_pointer_mode): Remove definition.
6312 * c-tree.h (c_default_pointer_mode): Remove declaration.
6313
62021f64
TB
63142015-03-27 Tobias Burnus <burnus@net-b.de>
6315
6316 PR c/65586
6317 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6318 error out.
6319 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6320 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6321 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6322
9b65e171
JJ
63232015-03-19 Jakub Jelinek <jakub@redhat.com>
6324
6325 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6326 attribute for DECL_EXTERNAL VAR_DECLs.
6327
17958621
JJ
63282015-03-11 Jakub Jelinek <jakub@redhat.com>
6329
6330 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6331 argument.
6332
7ccb1a11
JJ
63332015-03-10 Jakub Jelinek <jakub@redhat.com>
6334
6335 PR c/65120
6336 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6337 before preparing arguments to warn_logical_not_parentheses.
6338
01177669
JJ
63392015-03-09 Jakub Jelinek <jakub@redhat.com>
6340
6341 PR c/65120
6342 * c-typeck.c (parser_build_binary_op): Don't warn for
6343 !!x == y or !b == y where b is _Bool.
6344
802ac282
MP
63452015-03-09 Marek Polacek <polacek@redhat.com>
6346
6347 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6348 * c-decl.c (grokdeclarator): Likewise.
6349 * c-typeck.c (build_binary_op): Likewise.
6350
e5165b60
MP
63512015-02-27 Marek Polacek <polacek@redhat.com>
6352
6353 PR c/65228
6354 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6355
065d214c
MP
63562015-02-14 Marek Polacek <polacek@redhat.com>
6357
6358 PR c/64768
6359 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6360 declared through a typedef name.
6361
e5d9235b
MP
63622015-02-13 Marek Polacek <polacek@redhat.com>
6363
6364 PR c/65050
6365 * c-decl.c (grokdeclarator): Print also the type when giving
6366 the error message about array's incomplete element type.
6367
fa01ffcc
JJ
63682015-02-11 Jakub Jelinek <jakub@redhat.com>
6369
6370 PR c/64824
6371 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6372 check in the POP macro.
6373
c3e38a03
MP
63742015-02-09 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/64856
6377 * c-typeck.c (process_init_element): Don't always wrap
6378 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6379 initializing a range of elements.
6380
4886ec8e
JJ
63812015-02-04 Jakub Jelinek <jakub@redhat.com>
6382
6383 PR c/64824
6384 PR c/64868
6385 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6386
c3e38a03 63872015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6388
6389 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6390 processing enum declaration.
6391
7b33f0c8
MP
63922015-01-29 Marek Polacek <polacek@redhat.com>
6393
6394 PR c/64709
6395 * c-typeck.c (pop_init_level): If constructor_elements has
6396 exactly one element with integer_zerop value, set constructor_zeroinit
6397 to 1. Remove braces around warning_init call.
6398
dea63e49
JJ
63992015-01-27 Jakub Jelinek <jakub@redhat.com>
6400
6401 PR c/64766
6402 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6403 of FUNCTION_DECLs with error_mark_node.
6404
d38f7dce
JJ
64052015-01-26 Jakub Jelinek <jakub@redhat.com>
6406
6407 PR c/64778
6408 * c-typeck.c (convert_arguments): Return -1 if there are
6409 error_args, even if we've diagnosed too many arguments.
6410
cbf5d0e7
RB
64112015-01-21 Richard Biener <rguenther@suse.de>
6412
6413 PR middle-end/64313
6414 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6415 for builtins the user declared correctly.
6416
41dbbb37
TS
64172015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6418 Bernd Schmidt <bernds@codesourcery.com>
6419 Cesar Philippidis <cesar@codesourcery.com>
6420 James Norris <jnorris@codesourcery.com>
6421 Jakub Jelinek <jakub@redhat.com>
6422 Ilmir Usmanov <i.usmanov@samsung.com>
6423
6424 * c-parser.c: Include "gomp-constants.h".
6425 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6426 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6427 Use OMP_CLAUSE_SET_MAP_KIND.
6428 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6429 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6430 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6431 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6432 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6433 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6434 "copyout", "create", "delete", "deviceptr", "gang", "host",
6435 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6436 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6437 "present_or_create", "pcreate", "seq", "self", "vector",
6438 "vector_length", "wait", "worker".
6439 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6440 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6441 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6442 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6443 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6444 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6445 (c_parser_oacc_data_clause_deviceptr)
6446 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6447 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6448 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6449 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6450 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6451 (c_parser_oacc_parallel, c_parser_oacc_update)
6452 (c_parser_oacc_wait): New functions.
6453 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6454 (c_finish_oacc_data): New prototypes.
6455 * c-typeck.c: Include "gomp-constants.h".
6456 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6457 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6458 OMP_CLAUSE_SET_MAP_KIND.
6459 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6460 (c_finish_oacc_data): New functions.
6461 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6462 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6463 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6464 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6465 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6466 GOMP_MAP_FORCE_DEVICEPTR.
6467
adfac8df
JJ
64682015-01-09 Michael Collison <michael.collison@linaro.org>
6469
6470 * c-array-notation.c: Include hash-set.h, machmode.h,
6471 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6472 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6473 * c-aux-info.c: Ditto.
6474 * c-convert.c: Ditto.
6475 * c-decl.c: Ditto.
6476 * c-errors.c: Ditto.
6477 * c-lang.c: Dittoxs.
6478 * c-objc-common.c: Ditto.
6479 * c-parser.c: Ditto.
6480 * c-typeck.c: Include hash-set.h, machmode.h,
6481 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6482 fold-const.h, wide-int.h, inchash.h, real.h and
6483 fixed-value.h due to flattening of tree.h.
6484
2cc901dc
MP
64852015-01-07 Marek Polacek <polacek@redhat.com>
6486
6487 PR c/64417
6488 * c-typeck.c (process_init_element): Disallow initialization of
6489 a flexible array member with a string constant if the structure
6490 is in an array.
6491
5624e564
JJ
64922015-01-05 Jakub Jelinek <jakub@redhat.com>
6493
e5341100
JJ
6494 PR sanitizer/64344
6495 * c-typeck.c (convert_for_assignment, c_finish_return): For
6496 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6497 types also set in_late_binary_op around convert call.
6498 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6499 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6500 result on expr as last argument to ubsan_instrument_float_cast,
6501 if in_late_binary_op, don't use c_save_expr but save_expr.
6502
5624e564
JJ
6503 Update copyright years.
6504
5bd012f8
MP
65052015-01-05 Marek Polacek <polacek@redhat.com>
6506
6507 PR c/64423
6508 * c-typeck.c (build_array_ref): Pass loc down to
6509 warn_array_subscript_with_type_char.
6510
3f8257db 65112014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6512
6513 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6514 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6515 element type.
8e745a17 6516 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6517 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6518 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6519 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6520 to PEDWARN_FOR_QUALIFIERS.
768952be 6521
8f94a8c4
JJ
65222014-12-17 Jakub Jelinek <jakub@redhat.com>
6523
6524 PR sanitizer/64289
6525 * c-convert.c: Include ubsan.h.
6526 (convert): For real -> integral casts and
6527 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6528 instead instrument the float cast directly.
6529
b731b390
JJ
65302014-11-29 Jakub Jelinek <jakub@redhat.com>
6531
6532 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6533 c_finish_stmt_expr): Remove NULL last argument from
6534 create_tmp_var_raw and create_tmp_var calls.
6535 * c-array-notation.c (fix_builtin_array_notation_fn,
6536 build_array_notation_expr, fix_conditional_array_notations_1,
6537 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6538
541e35a6
MP
65392014-11-28 Marek Polacek <polacek@redhat.com>
6540
6541 PR c/63862
6542 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6543 convert the right operand to integer type.
6544
b286be94
MP
65452014-11-25 Marek Polacek <polacek@redhat.com>
6546
6547 PR c/63877
6548 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6549 for inline functions.
6550
aa7da51a
JJ
65512014-11-21 Jakub Jelinek <jakub@redhat.com>
6552
6553 PR target/63764
6554 * c-typeck.c (build_array_ref): Adjust
6555 convert_vector_to_pointer_for_subscript caller. If it returns true,
6556 call non_lvalue_loc on the result.
6557
d876207f
RB
65582014-11-11 Richard Biener <rguenther@suse.de>
6559
6560 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6561 to true.
6562
e5e44252
AK
65632014-11-10 Andi Kleen <ak@linux.intel.com>
6564
6565 PR c/60804
6566 * c-parser.c (c_parser_statement_after_labels): Call
6567 check_no_cilk.
6568 (c_parser_if_statement): Dito.
6569 (c_parser_switch_statement): Dito.
6570 (c_parser_while_statement): Dito.
6571 (c_parser_do_statement): Dito.
6572 (c_parser_for_statement): Dito.
6573 * c-typeck.c (c_finish_loop): Dito.
6574
13c21655
PC
65752014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6576
6577 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6578 OPT_Wshift_count_overflow in the warnings.
6579
2d51fcef
MP
65802014-10-30 Marek Polacek <polacek@redhat.com>
6581
6582 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6583 print the stripped version as well, if they're not the same.
6584
ef4bddc2
RS
65852014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6586
6587 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6588 machine_mode.
6589
c582198b
AM
65902014-10-28 Andrew MacLeod <amacleod@redhat.com>
6591
6592 * c-decl.c: Adjust include files.
6593 * c-parser.c: Ditto.
6594
ddc8de03
PM
65952014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6596 Tom Tromey <tromey@redhat.com>
6597
6598 * c-tree.h (enum c_oracle_request): New.
6599 (c_binding_oracle_function): New typedef.
6600 (c_binding_oracle, c_pushtag, c_bind): Declare.
6601 * c-decl.c (c_binding_oracle): New global.
6602 (I_SYMBOL_CHECKED): New macro.
6603 (i_symbol_binding): New function.
6604 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6605 (I_TAG_CHECKED): New macro.
6606 (i_tag_binding): New function.
6607 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6608 (I_LABEL_CHECKED): New macro.
6609 (i_label_binding): New function.
6610 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6611 (c_print_identifier): Save and restore c_binding_oracle.
6612 (c_pushtag, c_bind): New functions.
6613
60393bbc
AM
66142014-10-27 Andrew MacLeod <amacleod@redhat.com>
6615
6616 * c-typeck.c: Adjust include files.
6617
d723bb7c
MLI
66182014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6619
6620 PR c++/53061
6621 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6622 initialization here...
6623 (c_initialize_diagnostics): ... but here. Set defaults after
6624 building pretty-printer.
6625
1bc5a451
MP
66262014-10-23 Marek Polacek <polacek@redhat.com>
6627
6628 PR c/63626
6629 * c-decl.c (pop_scope): Don't print warning in external_scope.
6630
4435bb92
MP
66312014-10-19 Marek Polacek <polacek@redhat.com>
6632
6633 PR c/63567
6634 * c-typeck.c (output_init_element): Allow initializing objects with
6635 static storage duration with compound literals even in C99 and add
6636 pedwarn for it.
6637
7278465e
MP
66382014-10-17 Marek Polacek <polacek@redhat.com>
6639
6640 PR c/63567
6641 * c-typeck.c (digest_init): Allow initializing objects with static
6642 storage duration with compound literals even in C99 and add pedwarn
6643 for it.
6644
d9b7be2e
MP
66452014-10-17 Marek Polacek <polacek@redhat.com>
6646
6647 PR c/63543
6648 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6649 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6650 error multiple times. Print the type.
6651
f406ae1f
MP
66522014-10-17 Marek Polacek <polacek@redhat.com>
6653
6654 PR c/63549
6655 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6656 type.
6657
92574c7c
MP
66582014-10-17 Marek Polacek <polacek@redhat.com>
6659
6660 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6661 (start_function): Use OPT_Wimplicit_int instead of 0.
6662 (store_parm_decls_oldstyle): Likewise.
6663
1bc4a978
MT
66642014-10-17 Alan Modra <amodra@gmail.com>
6665
6666 PR middle-end/61848
6667 * c-decl.c (merge_decls): Don't merge section name or tls model
6668 to newdecl symtab node, instead merge to olddecl. Override
6669 existing olddecl section name. Set tls_model for all thread-local
6670 vars, not just OMP thread-private ones. Remove incorrect comment.
6671
83685514
AM
66722014-10-16 Andrew MacLeod <amacleod@redhat.com>
6673
6674 * c-decl.c: Adjust include files.
6675
78a7c317
DD
66762014-10-14 DJ Delorie <dj@redhat.com>
6677
6678 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6679 (c_token_starts_typename): Check all __intN, not just __int128.
6680 (c_token_starts_declspecs): Likewise.
6681 (c_parser_declspecs): Likewise.
6682 (c_parser_attribute_any_word): Likewise.
6683 (c_parser_objc_selector): Likewise.
6684 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6685 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6686 is specified.
6687 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6688 __int128.
6689 (finish_declspecs): Likewise.
6690
74d98c1e
AB
66912014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6692
8e745a17 6693 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6694 the duplicate code.
8e745a17 6695 (c_parser_statement): Call the new function.
74d98c1e 6696
84937de2
MP
66972014-10-09 Marek Polacek <polacek@redhat.com>
6698
6699 PR c/63480
6700 * c-typeck.c (pop_init_level): Don't warn about initializing
6701 with { }.
6702
0382aaa0
MP
67032014-10-07 Marek Polacek <polacek@redhat.com>
6704
6705 PR c/59717
6706 * c-decl.c (header_for_builtin_fn): New function.
6707 (implicitly_declare): Suggest which header to include.
6708
7a0ca710
MP
67092014-10-07 Marek Polacek <polacek@redhat.com>
6710
6711 * c-convert.c (convert): Use error_operand_p.
6712 * c-typeck.c (require_complete_type): Likewise.
6713 (really_atomic_lvalue): Likewise.
6714 (digest_init): Likewise.
6715 (handle_omp_array_sections_1): Likewise.
6716
6bc8a126
MP
67172014-10-03 Marek Polacek <polacek@redhat.com>
6718
6719 PR c/63453
6720 * c-decl.c (pop_scope): Don't warn about "inline function declared
6721 but never defined" for functions marked with gnu_inline attribute.
6722
d90c0a59
JJ
67232014-09-25 Jakub Jelinek <jakub@redhat.com>
6724
6725 PR c++/63249
6726 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6727 on low_bound and length.
6728
083e891e
MP
67292014-09-24 Marek Polacek <polacek@redhat.com>
6730
6731 PR c/61405
6732 PR c/53874
6733 * c-parser.c: Don't define CPP_KEYWORD.
6734 (c_parser_switch_statement): Pass original type to c_finish_case.
6735 * c-tree.h (c_finish_case): Update declaration.
6736 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6737 conditionally to c_do_switch_warnings.
6738
8d95fe25
MP
67392014-09-03 Marek Polacek <polacek@redhat.com>
6740
6741 PR c/62024
6742 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6743 conversions.
6744
9a771876
JJ
67452014-09-02 Jakub Jelinek <jakub@redhat.com>
6746 Balaji V. Iyer <balaji.v.iyer@intel.com>
6747 Igor Zamyatin <igor.zamyatin@intel.com>
6748
6749 * c-parser.c (c_parser_cilk_for): New function.
6750 (c_parser_cilk_grainsize): Likewise.
6751 (c_get_temp_regvar): Likewise.
6752 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6753 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6754 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6755 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6756 case.
6757
b7679d96
CG
67582014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6759
6760 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6761 with using HOST_WIDE_INT without truncation to 'int'
6762
59ea0364
MP
67632014-08-22 Marek Polacek <polacek@redhat.com>
6764
6765 PR c++/62199
6766 * c-typeck.c (parser_build_binary_op): Adjust call to
6767 warn_logical_not_parentheses.
6768
671a475e
IZ
67692014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6770
6771 PR other/62008
6772 * c-parser.c (c_parser_array_notation): Check for correct
6773 type of an array added.
6774
04159acf
MP
67752014-08-19 Marek Polacek <polacek@redhat.com>
6776
6777 PR c++/62153
6778 * c-typeck.c (build_binary_op): If either operand of a comparison
6779 is a boolean expression, call maybe_warn_bool_compare.
6780
c77935ee
PP
67812014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6782
6783 PR c/45584
6784 * c-typeck.c (build_c_cast): Do a conversion even when the
6785 TYPE_MAIN_VARIANTs are the same.
6786
35aff4fb
MP
67872014-08-19 Marek Polacek <polacek@redhat.com>
6788
6789 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6790 pedwarn_c99 instead of pedwarn.
6791 (grokfield): Likewise.
6792 (warn_defaults_to): New function.
6793 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6794 Unconditionally call pedwarn_c99 instead of pedwarn.
6795 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6796 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6797 check flag_isoc11 before.
6798 * c-errors.c (pedwarn_c99): Change the return type to bool.
6799 Handle -Wc99-c11-compat.
6800 * c-parser.c (disable_extension_diagnostics): Handle
6801 warn_c99_c11_compat.
6802 (restore_extension_diagnostics): Likewise.
6803 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6804 instead of pedwarn, don't check flag_isoc11 before.
6805 (c_parser_declspecs): Likewise.
6806 (c_parser_alignas_specifier): Likewise.
6807 (c_parser_alignof_expression): Likewise.
6808 (c_parser_generic_selection): Likewise.
6809 * c-tree.h (pedwarn_c99): Update declaration.
6810 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6811 of pedwarn_c99.
6812
177cce46
MP
68132014-08-19 Marek Polacek <polacek@redhat.com>
6814
6815 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6816 to pedwarn_c90.
6817 * c-errors.c: Include "opts.h".
6818 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6819 * c-parser.c (disable_extension_diagnostics): Handle negative value
6820 of warn_c90_c99_compat, too.
6821 (restore_extension_diagnostics): Likewise.
6822 (c_parser_compound_statement_nostart): Pass
6823 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6824
6dc99c33
MP
68252014-08-12 Marek Polacek <polacek@redhat.com>
6826
6827 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6828 Add pedwarn.
6829 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6830 Likewise.
6831 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6832
3f8257db 68332014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6834
6835 PR c/51849
6836 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6837 Call pedwarn_c90 instead of pedwarn.
6838 (check_bitfield_type_and_width): Likewise.
6839 (declspecs_add_qual): Likewise.
6840 (declspecs_add_type): Likewise.
6841 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6842 Adjust to only call pedwarn_c90.
6843 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6844 pedwarn_c90 instead of pedwarn.
6845 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6846 * c-parser.c (disable_extension_diagnostics): Handle
6847 warn_c90_c99_compat.
6848 (restore_extension_diagnostics): Likewise.
6849 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6850 pedwarn_c90 instead of pedwarn.
6851 (c_parser_initelt): Likewise.
6852 (c_parser_postfix_expression): Likewise.
6853 (c_parser_postfix_expression_after_paren_type): Likewise.
6854 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6855 * c-tree.h: Fix formatting.
6856 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6857 pedwarn_c90 instead of pedwarn.
6858
9f25a338
TS
68592014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6860
6861 * c-typeck.c: Remove include of pointer-set.h.
6862
044331a8
MP
68632014-08-07 Marek Polacek <polacek@redhat.com>
6864
6865 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6866
b787e7a2
TS
68672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6868
6869 * c-typeck.c: Use hash_map instead of pointer_map.
6870
6e2830c3
TS
68712014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6872
6873 * c-decl.c: Use hash_set instead of pointer_set.
6874
a7ee52fb
IZ
68752014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6876
6877 PR middle-end/61455
6878 * c-array-notation.c (expand_array_notations): Handling
6879 of DECL_EXPR added.
6880
b4dfdc11
MG
68812014-07-31 Marc Glisse <marc.glisse@inria.fr>
6882
6883 PR c++/60517
6884 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6885 a local variable.
6886
976d5a22
TT
68872014-07-30 Tom Tromey <tromey@redhat.com>
6888
6889 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6890 field.
6891 (really_start_incremental_init, push_init_level): Initialize
6892 designator_depth.
6893 (pop_init_level): Set global designator_depth.
6894 (process_init_element): Check for designated_init attribute.
6895
30281de2
MP
68962014-07-20 Marek Polacek <polacek@redhat.com>
6897
6898 PR c/61852
6899 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6900 (implicitly_declare): Pass location to implicit_decl_warning.
6901
b108f48f
JJ
69022014-07-14 Jakub Jelinek <jakub@redhat.com>
6903
6904 PR middle-end/61294
6905 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6906 If non-NULL, call c_parser_check_literal_zero.
6907 (c_parser_check_literal_zero): New function.
6908 (c_parser_postfix_expression_after_primary): Adjust
6909 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6910
773ec47f
MP
69112014-07-06 Marek Polacek <polacek@redhat.com>
6912
6913 PR c/6940
6914 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6915 * c-tree.h (C_ARRAY_PARAMETER): Define.
6916 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6917 function parameter.
6918
22e1cf1c 69192014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6920 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6921
6922 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6923 releasing symbol.
6924
52ec0ea3
MP
69252014-07-01 Marek Polacek <polacek@redhat.com>
6926
6927 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6928 instead of 0 to WARN_FOR_ASSIGNMENT.
6929
d5c3d343
MP
69302014-07-01 Marek Polacek <polacek@redhat.com>
6931
6932 PR c/58286
6933 * c-typeck.c (convert_for_assignment): Pass
6934 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6935
6a7253a4
MP
69362014-06-30 Marek Polacek <polacek@redhat.com>
6937
6938 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6939 has no_sanitize_undefined attribute.
6940
5e88a8f4
IZ
69412014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6942
6943 PR middle-end/57541
6944 * c-array-notation.c (fix_builtin_array_notation_fn):
6945 Check for 0 arguments in builtin call. Check that bultin argument is
6946 correct.
6947 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6948 index.
6949
9698b078
SH
69502014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6951
6952 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6953 qualifiers in __auto_type for atomic types.
6954 (c_parser_typeof_specifier): Discard all type qualifiers in
6955 __typeof__ for atomic types.
6956
6e07c515
MP
69572014-06-25 Marek Polacek <polacek@redhat.com>
6958
6959 PR c/61162
6960 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6961 the return expression to c_finish_return.
6962
da6f124d
JJ
69632014-06-25 Jakub Jelinek <jakub@redhat.com>
6964
6965 * c-typeck.c (c_finish_omp_clauses): Make sure
6966 OMP_CLAUSE_LINEAR_STEP has correct type.
6967
c203e8a7
TS
69682014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6969
6970 * c-decl.c: Adjust.
6971
56ad0e38
JJ
69722014-06-24 Jakub Jelinek <jakub@redhat.com>
6973
6974 * c-parser.c (c_parser_omp_for_loop): For
6975 #pragma omp parallel for simd move lastprivate clause from parallel
6976 to for rather than simd.
6977
47c2554f
MP
69782014-06-23 Marek Polacek <polacek@redhat.com>
6979
6980 * c-typeck.c (parser_build_binary_op): Don't call
6981 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6982
56363ffd
JH
69832014-06-15 Jan Hubicka <hubicka@ucw.cz>
6984
6985 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6986 * c-decl.c (merge_decls): Likewise.
6987
d7ff7ae5
MP
69882014-06-09 Marek Polacek <polacek@redhat.com>
6989
6990 PR c/36446
6991 * c-typeck.c (error_init): Call inform instead of error_at.
6992 (pedwarn_init): Call inform instead of pedwarn.
6993 (warning_init): Call inform instead of warning_at.
6994
24d047a3
JH
69952014-06-07 Jan Hubicka <hubicka@ucw.cz>
6996
6997 * c-decl.c (merge_decls): Use set_decl_section_name.
6998 (duplicate_decls): Remove node if it exists.
6999
9bac5cbb
G
70002014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7001
7002 PR c/53119
7003 * c-typeck.c (push_init_level, process_init_element,
7004 pop_init_level): Correct check for zero initialization, move
7005 missing brace warning to respect zero initialization.
7006
8ffcdea8
MP
70072014-06-05 Marek Polacek <polacek@redhat.com>
7008
7009 PR c/56724
7010 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7011
742938c9
MP
70122014-06-05 Marek Polacek <polacek@redhat.com>
7013
7014 PR c/49706
7015 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7016 on the left hand side operand of a comparison.
742938c9 7017
6447c55d
MP
70182014-06-05 Marek Polacek <polacek@redhat.com>
7019
7020 PR c/48062
7021 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7022 Print note only if the warning was printed.
7023
9dc7743c
IZ
70242014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7025
7026 PR c/58942
7027 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7028 with a pointer.
7029
fedfecef
MP
70302014-06-03 Marek Polacek <polacek@redhat.com>
7031
7032 PR c/60439
7033 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7034 c_start_case.
7035 * c-tree.h (c_start_case): Update.
7036 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7037 switch condition has boolean value.
7038
9b2b7279
AM
70392014-06-02 Andrew MacLeod <amacleod@redhat.com>
7040
7041 * c-decl.c: Include builtins.h.
7042 * c-parser.c: Likewise.
7043
5c1bc275
MP
70442014-05-27 Marek Polacek <polacek@redhat.com>
7045
7046 PR c/56724
7047 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7048 error and warning calls to error_at and warning_at. Pass location of
7049 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7050 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7051 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7052
97563bc8
IZ
70532014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7054
7055 PR c/61191
7056 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7057 function parameters.
7058
aede2c10
JH
70592014-05-23 Jan Hubicka <hubicka@ucw.cz>
7060
7061 * c-decl.c (merge_decls): Preserve symtab node pointers.
7062 (duplicate_decls): Free new decl.
7063
edbba2ce
TS
70642014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7065
f3316c6d
TS
7066 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7067 initialization.
7068
edbba2ce
TS
7069 * c-parser.c (c_parser_omp_target): Return bool values.
7070
68c81f24
TS
70712014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7072
7073 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7074 num_teams_loc variable to num_thread_limit_loc.
7075
632f2871
RS
70762014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7077
7078 * c-array-notation.c (expand_array_notations): Use void_node
7079 instead of void_zero_node.
7080
766090c2
TS
70812014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7082
7083 * c-decl.c (finish_struct): Adjust.
7084 (finish_enum): Likewise.
7085 (bind): Adjust.
7086 (record_inline_static): Likewise.
7087 (push_scope): Likewise.
7088 (make_label): Likewise.
7089 (lookup_label_for_goto): Likewise.
7090 (finish_struct): Likewise.
7091 (finish_enum): Likewise.
7092 (store_parm_decls): Likewise.
7093 (c_push_function_context): Likewise.
7094 * c-lang.h: Remove usage of variable_size gty attribute.
7095 * c-parser.c (c_parse_init): Adjust.
7096 (c_parse_file): Likewise.
7097
2b107f6b
MP
70982014-05-13 Marek Polacek <polacek@redhat.com>
7099
7100 PR c/61162
7101 * c-typeck.c (convert_for_assignment): Pass location to
7102 WARN_FOR_ASSIGNMENT instead of input_location.
7103
d033409e
MP
71042014-05-10 Marek Polacek <polacek@redhat.com>
7105
7106 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7107 maybe_warn_string_init.
7108 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7109 maybe_warn_string_init.
7110 * c-tree.h (maybe_warn_string_init): Update declaration.
7111 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7112 Call pedwarn_init with loc instead of with input_location.
7113 (digest_init): Pass init_loc to maybe_warn_string_init.
7114 (pop_init_level): Call pedwarn_init with loc instead of with
7115 input_location.
7116 (set_init_index): Likewise.
7117 (process_init_element): Likewise.
7118
ea58ef42
MP
71192014-05-09 Marek Polacek <polacek@redhat.com>
7120
7121 PR c/61096
7122 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7123 (c_parser_initelt): Pass location to set_init_label. Pass array index
7124 location to set_init_index.
7125 * c-tree.h (push_init_level): Update declaration.
7126 (pop_init_level): Likewise.
7127 (set_init_index): Likewise.
7128 (set_init_label): Likewise.
7129 * c-typeck.c (error_init): Add location parameter. Call error_at
7130 instead of error.
7131 (digest_init): Pass init_loc to error_init.
7132 (really_start_incremental_init):
7133 (push_init_level): Add location parameter. Pass loc to pop_init_level
7134 and error_init.
7135 (pop_init_level): Likewise.
7136 (set_designator): Add location parameter. Pass loc to pop_init_level,
7137 push_init_level, and error_init.
7138 (set_init_index): Add location parameter. Pass loc to error_init and
7139 set_designator.
7140 (set_init_label): Likewise.
7141 (output_init_element): Pass loc to error_init.
7142 (process_init_element): Pass loc to error_init, pop_init_level,
7143 pedwarn_init, and push_init_level.
7144
661a0813
MP
71452014-05-09 Marek Polacek <polacek@redhat.com>
7146
7147 PR c/50459
7148 * c-parser.c (c_parser_attributes): Parse the arguments as an
7149 expression-list if the attribute takes identifier.
7150
2793eeab
MP
71512014-05-08 Marek Polacek <polacek@redhat.com>
7152
7153 PR c/61053
7154 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7155 TYPE_ALIGN_UNIT.
7156
f827930a
MP
71572014-05-08 Marek Polacek <polacek@redhat.com>
7158
7159 PR c/61077
7160 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7161 of main.
7162
1d60af08
KZ
71632014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7164 Mike Stump <mikestump@comcast.net>
7165 Richard Sandiford <rdsandiford@googlemail.com>
7166
7167 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7168 (finish_enum): Use wide-int interfaces.
7169 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7170 * c-typeck.c (build_c_cast): Likewise.
7171 (set_nonincremental_init_from_string): Likewise.
7172 (c_tree_equal): Likewise.
7173
a0e24419
MP
71742014-05-02 Marek Polacek <polacek@redhat.com>
7175
7176 PR c/25801
7177 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7178 Return size_one_node when the type is not complete.
7179 (pointer_diff): Remove comment.
7180 (build_unary_op): Improve error messages.
7181
19fc9faa
MP
71822014-05-02 Marek Polacek <polacek@redhat.com>
7183
7184 * c-typeck.c (c_finish_return): Separate warning_at calls.
7185
63bc4e87
MP
71862014-05-02 Marek Polacek <polacek@redhat.com>
7187
7188 * c-tree.h (error_init): Remove declaration.
7189 (pedwarn_init): Likewise.
7190 * c-typeck.c (error_init): Make static and move above.
7191 (pedwarn_init): Likewise.
7192 (warning_init): Move above.
7193 (maybe_warn_string_init): Likewise.
7194
4bd2511b
JL
71952014-05-01 Jeff Law <law@redhat.com>
7196
7197 Revert:
7198
7199 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7200 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7201 avoid goto.
7202
6a358dcb
MP
72032014-05-02 Marek Polacek <polacek@redhat.com>
7204
7205 PR c/60784
7206 * c-typeck.c (push_init_level): Set constructor_designated to
7207 p->designated for structures.
7208
ae5ebda4
MP
72092014-05-01 Marek Polacek <polacek@redhat.com>
7210
7211 PR c/60915
7212 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7213 function-definition has an attribute after the declarator.
7214
96b40f8d
MP
72152014-05-01 Marek Polacek <polacek@redhat.com>
7216
7217 PR c/60257
7218 * c-typeck.c (warning_init): Add location_t parameter. Call
7219 warning_at instead of warning.
7220 (push_init_level): Pass input_location to warning_init.
7221 (add_pending_init): Add location_t parameter. Pass loc to
7222 warning_init.
7223 (set_nonincremental_init): Pass input_location to add_pending_init.
7224 (set_nonincremental_init_from_string): Likewise.
7225 (output_init_element): Pass loc to warning_init and to
7226 add_pending_init.
7227
32e00768
MP
72282014-05-01 Marek Polacek <polacek@redhat.com>
7229
7230 PR c/43395
7231 * c-typeck.c (c_finish_return): Distinguish between label and variable
7232 when warning about returning local address.
7233
c9379ce2
MP
72342014-05-01 Marek Polacek <polacek@redhat.com>
7235
7236 PR c/29467
7237 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7238 in C89 mode.
7239
d00887e8
MP
72402014-05-01 Marek Polacek <polacek@redhat.com>
7241
7242 PR c/43245
7243 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7244 instead of 0 to WARN_FOR_QUALIFIERS.
7245
5436fa2e
MP
72462014-05-01 Marek Polacek <polacek@redhat.com>
7247
7248 PR c/56989
7249 * c-typeck.c (default_conversion): Use better location for
7250 error call.
7251
f8ed5150
MP
72522014-04-30 Marek Polacek <polacek@redhat.com>
7253
7254 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7255 also when SANITIZE_FLOAT_DIVIDE is on.
7256
8337d1db
MP
72572014-04-30 Marek Polacek <polacek@redhat.com>
7258
7259 PR c/60139
7260 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7261 and pedwarn_init. Use loc insted of input_location.
7262
c4bdc42f
MP
72632014-04-30 Marek Polacek <polacek@redhat.com>
7264
7265 PR c/60351
7266 * c-typeck.c (build_binary_op): Use location when warning about
7267 shift count.
7268
45484dcf
MP
72692014-04-25 Marek Polacek <polacek@redhat.com>
7270
7271 PR c/18079
7272 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7273 always_inline/noinline and hot/cold attributes.
7274
34cf811f
MP
72752014-04-25 Marek Polacek <polacek@redhat.com>
7276
7277 PR c/60114
7278 * c-parser.c (c_parser_initelt): Pass input_location to
7279 process_init_element.
7280 (c_parser_initval): Pass loc to process_init_element.
7281 * c-tree.h (process_init_element): Adjust declaration.
7282 * c-typeck.c (push_init_level): Pass input_location to
7283 process_init_element.
7284 (pop_init_level): Likewise.
7285 (set_designator): Likewise.
7286 (output_init_element): Add location_t parameter. Pass loc to
7287 digest_init.
7288 (output_pending_init_elements): Pass input_location to
7289 output_init_element.
7290 (process_init_element): Add location_t parameter. Pass loc to
7291 output_init_element.
7292
42056eac
JJ
72932014-04-24 Jakub Jelinek <jakub@redhat.com>
7294
7295 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7296 atomic-clause, allow comma in between atomic-clause and
7297 seq_cst.
7298
e162a134
JJ
72992014-04-22 Jakub Jelinek <jakub@redhat.com>
7300
7301 PR c/59073
7302 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7303 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7304
2f6babac
IZ
73052014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7306
7307 PR middle-end/60469
7308 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7309 create_tmp_var instead build_decl for creating temps.
7310 (build_array_notation_expr): Likewise.
7311 (fix_conditional_array_notations_1): Likewise.
7312 (fix_array_notation_expr): Likewise.
7313 (fix_array_notation_call_expr): Likewise.
7314
8edbfaa6
JJ
73152014-03-28 Jakub Jelinek <jakub@redhat.com>
7316
7317 PR c++/60689
7318 * c-tree.h (c_build_function_call_vec): New prototype.
7319 * c-typeck.c (build_function_call_vec): Don't call
7320 resolve_overloaded_builtin here.
7321 (c_build_function_call_vec): New wrapper function around
7322 build_function_call_vec. Call resolve_overloaded_builtin here.
7323 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7324 Call c_build_function_call_vec instead of build_function_call_vec.
7325 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7326 * c-decl.c (finish_decl): Likewise.
7327
7485aeea
MLI
73282014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7329
7330 PR c/55383
7331 * c-typeck.c: Use correct format string in cast-qual warning
7332
b17a8b07
TS
73332014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7334
7335 * c-decl.c (c_decl_attributes): Use
7336 lang_hooks.types.omp_mappable_type.
7337 * c-typeck.c (c_finish_omp_clauses): Likewise.
7338
3af9c5e9
MP
73392014-03-06 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/60197
7342 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7343 of checking tree code.
7344
1c9f5f33
PK
73452014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7346
7347 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7348 (c_parser_parameter_declaration): Likewise.
7349
cc28fc7f
MP
73502014-02-19 Marek Polacek <polacek@redhat.com>
7351
7352 PR c/60195
7353 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7354 Call mark_exp_read on exp.value.
7355 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7356 TREE_ADDRESSABLE on old instead of val.
7357 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7358
b581c05c
PK
73592014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7360
7361 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7362 C_EXPR_APPEND by vec_safe_push.
7363 * c-tree.h (C_EXPR_APPEND): Remove.
7364
81e5eca8
MP
73652014-01-31 Marek Polacek <polacek@redhat.com>
7366
7367 PR c/59963
7368 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7369 build_function_call_vec.
7370 (build_function_call): Likewise.
7371 (build_atomic_assign): Likewise.
7372 (build_function_call_vec): Add arg_loc parameter. Use it.
7373 (convert_arguments): Likewise.
7374 (convert_for_assignment): Rename rhs_loc to expr_loc.
7375 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7376 (c_parser_objc_keywordexpr): Likewise.
7377 (c_parser_postfix_expression_after_primary): Call
7378 build_function_call_vec with expr_loc rather than op_loc.
7379 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7380 build_function_call_vec.
7381 (c_parser_expr_list): Add locations parameter. Fill it with locations
7382 of function arguments.
7383 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7384
68fca595
MP
73852014-01-30 Marek Polacek <polacek@redhat.com>
7386
7387 PR c/59940
7388 * c-typeck.c (build_function_call_vec): Use loc parameter.
7389 (convert_arguments): Add location parameter. Use it.
7390 (ep_convert_and_check): Likewise.
7391 (build_atomic_assign): Adjust convert_for_assignment call.
7392 (build_modify_expr): Likewise.
7393 (digest_init): Likewise.
7394 (c_finish_return): Likewise.
7395 (build_conditional_expr): Adjust ep_convert_and_check calls.
7396 (convert_for_assignment): Add rhs_loc parameter. Use it.
7397 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7398 calls.
7399
fa337f3a
RB
74002014-01-30 Richard Biener <rguenther@suse.de>
7401
7402 PR c/59905
7403 * c-typeck.c (build_function_call_vec): Do not replace calls
7404 to a function via an incompatible type with a runtime abort.
7405
b72271b9
BI
74062014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7407
7408 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7409 flag_enable_cilkplus with flag_cilkplus.
7410 (c_parser_direct_declarator_inner): Likewise.
7411 (c_parser_attribute_any_word): Likewise.
7412 (c_parser_attributes): Likewise.
7413 (c_parser_compound_statement): Likewise.
7414 (c_parser_statement_after_labels): Likewise.
7415 (c_parser_if_statement): Likewise.
7416 (c_parser_switch_statement): Likewise.
7417 (c_parser_do_statement): Likewise.
7418 (c_parser_for_statement): Likewise.
7419 (c_parser_unary_expression): Likewise.
7420 (c_parser_postfix_expression): Likewise.
7421 (c_parser_postfix_expression_after_primary): Likewise.
7422 (c_parser_postfix_expression_after_primary): Likewise.
7423 (c_parser_omp_clause_name): Likewise.
7424 (c_finish_omp_declare_simd): Likewise.
7425 (c_parser_cilk_verify_simd): Likewise.
7426 * c-typeck.c (build_array_ref): Likewise.
7427 (build_function_call_vec): Likewise.
7428 (convert_arguments): Likewise.
7429 (build_compound_expr): Likewise.
7430 (c_finish_return): Likewise.
7431 (c_finish_if_stmt): Likewise.
7432 (c_finish_loop): Likewise.
7433 (build_binary_op): Likewise.
7434
393e8e8b
MP
74352014-01-23 Marek Polacek <polacek@redhat.com>
7436
7437 PR c/59846
7438 * c-typeck.c (parser_build_binary_op): Use location instead of
7439 input_location.
7440 (build_binary_op): Pass location to shorten_compare.
7441
f04dda30
MP
74422014-01-23 Marek Polacek <polacek@redhat.com>
7443
7444 PR c/58346
7445 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7446 an empty aggregate.
7447
789eadcd
MP
74482014-01-23 Marek Polacek <polacek@redhat.com>
7449
7450 PR c/59871
7451 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7452 of a comma expression.
7453 (emit_side_effect_warnings): Likewise.
7454
40f14e9f
BI
74552014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7456
7457 PR c/59825
7458 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7459 function to use walk_tree and moved a lot of its functionality to
7460 expand_array_notations.
7461 (expand_array_notations): New function.
7462
74558dd9
BI
74632014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7464
7465 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7466 attribute an attribute without value.
7467
652fea39
JJ
74682014-01-23 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR middle-end/58809
7471 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7472 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7473
f34f1c87
MP
74742014-01-22 Marek Polacek <polacek@redhat.com>
7475
7476 PR c/59891
7477 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7478 of remove_c_maybe_const_expr on op1 and op2.
7479
241f845a
JJ
74802014-01-15 Jakub Jelinek <jakub@redhat.com>
7481
7482 PR c/58943
7483 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7484 effects, preevaluate rhs using SAVE_EXPR first.
7485
9a74f20c
BI
74862014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7487
7488 PR c++/59631
7489 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7490 statements with if-elseif statements.
7491
96066ce1
MP
74922014-01-06 Marek Polacek <polacek@redhat.com>
7493
7494 PR c/57773
7495 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7496 defined bit-field types only in ISO C.
7497
23a5b65a
RS
74982014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7499
7500 Update copyright years
7501
f9030485
RS
75022014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7503
7504 * c-array-notation.c: Use the standard form for the copyright notice.
7505
41958c28
BI
75062013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7507
7508 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7509 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7510 field in parser is not empty. If not-empty, call the function
7511 c_parser_finish_omp_declare_simd.
7512 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7513 between SIMD-enabled functions and #pragma simd. Added new parameter.
7514 (c_parser_cilk_all_clauses): Modified the usage of the function
7515 c_parser_cilk_clause_vectorlength as mentioned above.
7516 (c_parser_cilk_simd_fn_vector_attrs): New function.
7517 (c_finish_cilk_simd_fn_tokens): Likewise.
7518 (is_cilkplus_vector_p): Likewise.
7519 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7520 "nomask," and "mask" strings in clause name.
7521 (c_parser_omp_all_clauses): Added 3 new case statements:
7522 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7523 PRAGMA_CILK_CLAUSE_NOMASK.
7524 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7525 check for vector attribute and if so call the function
7526 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7527 called the function c_finish_cilk_simd_fn_tokens.
7528 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7529 parser field is non-empty. If so, parse them as you would parse
7530 the omp declare simd pragma.
7531 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7532 Added a check when step is a parameter and flag it as error.
7533 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7534 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7535 pragma_omp_clause.
7536
cef0fd0e
TS
75372013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7538
7539 * c-parser.c (c_parser_omp_parallel): Fix description.
7540
12893402
BI
75412013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7542
7543 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7544 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7545 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7546 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7547
296674db
JM
75482013-12-04 Joseph Myers <joseph@codesourcery.com>
7549
7550 PR c/52023
7551 * c-parser.c (c_parser_alignas_specifier): Use
7552 c_sizeof_or_alignof_type instead of c_alignof.
7553 (c_parser_alignof_expression): Likewise, with min_alignof
7554 parameter depending on alignof spelling used.
7555
edd28054
MP
75562013-12-04 Marek Polacek <polacek@redhat.com>
7557
7558 PR c/54113
7559 * c-decl.c (start_function): Don't warn for missing prototype for
7560 inline functions.
7561
da0fc454
MP
75622013-12-03 Marek Polacek <polacek@redhat.com>
7563
7564 PR c/59351
7565 * c-decl.c (build_compound_literal): Allow compound literals with
7566 empty initial value.
7567
4c2ecab0
JM
75682013-12-02 Joseph Myers <joseph@codesourcery.com>
7569
7570 PR c/58235
7571 * c-typeck.c (build_modify_expr): Diagnose assignment to
7572 expression with array type.
7573
340baef7
JM
75742013-11-29 Joseph Myers <joseph@codesourcery.com>
7575
7576 PR c/42262
7577 * c-typeck.c (process_init_element): Do not treat a string as
7578 initializing a whole array when used with a designator for an
7579 individual element.
7580
6763b9f7
JM
75812013-11-29 Joseph Myers <joseph@codesourcery.com>
7582
7583 PR c/57574
7584 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7585 an inline function following a static declaration.
7586
e7bd1de1
JJ
75872013-11-28 Jakub Jelinek <jakub@redhat.com>
7588
7589 PR c/59310
7590 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7591 to p_name before calling c_parser_omp_teams instead of after.
7592 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7593 argument. Remove unused p_name variable.
7594
0136f8f0
AH
75952013-11-27 Aldy Hernandez <aldyh@redhat.com>
7596 Jakub Jelinek <jakub@redhat.com>
7597
7598 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7599 external_scope is NULL.
7600
241b71bb
TV
76012013-11-27 Tom de Vries <tom@codesourcery.com>
7602 Marc Glisse <marc.glisse@inria.fr>
7603
7604 PR c++/59032
7605 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7606
2fb9a547
AM
76072013-11-22 Andrew MacLeod <amacleod@redhat.com>
7608
7609 * c-typeck.c: Add required include files from gimple.h.
7610
8400e75e
DM
76112013-11-22 David Malcolm <dmalcolm@redhat.com>
7612
7613 * c-decl.c (define_label, shadow_tag_warned)
7614 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7615 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7616 (declspecs_add_type): Remove use of in_system_header macro.
7617 * c-parser.c (c_parser_unary_expression): Likewise.
7618 * c-typeck.c (store_init_value, process_init_element)
7619 (c_start_case): Likewise.
7620
7621 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7622 macro.
7623
7624 * c-parser.c (c_parser_set_source_position_from_token): Remove
7625 reference to in_system_header from comment.
7626
386b1f1f
RS
76272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7628
7629 * c-decl.c (grokdeclarator): Update comment to refer to
7630 tree_to_[su]hwi rather than tree_low_cst.
7631
ae7e9ddd
RS
76322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7633
7634 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7635 tree_to_uhwi throughout.
7636
9439e9a1
RS
76372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7638
7639 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7640 throughout.
7641
9541ffee
RS
76422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7643
7644 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7645 throughout.
7646
c02065fc
AH
76472013-11-15 Aldy Hernandez <aldyh@redhat.com>
7648
7649 * c-parser.c (c_parser_cilk_simd): New.
7650 (c_parser_cilk_verify_simd): New.
7651 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7652 (c_parser_omp_for_loop): Add case for NE_EXPR.
7653 Set c_break_label for CILK_SIMD.
7654 (c_parser_cilk_clause_vectorlength): New.
7655 (c_parser_cilk_clause_linear): New.
7656 (c_parser_cilk_clause_name): New.
7657 (c_parser_cilk_all_clauses): New.
7658 * c-typeck.c (build_unary_op): Pass location argument to
7659 readonly_error.
7660 (build_modify_expr): Same.
7661 (build_asm_expr): Same.
7662 (c_finish_bc_stmt): Error on break/continue in loops.
7663
18f429e2
AM
76642013-11-14 Andrew MacLeod <amacleod@redhat.com>
7665
7666 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7667
d8a2d370
DN
76682013-11-14 Diego Novillo <dnovillo@google.com>
7669
7670 * c-decl.c: Include print-tree.h.
7671 Include stor-layout.h.
7672 Include varasm.h.
7673 Include attribs.h.
7674 Include stringpool.h.
7675 * c-lang.c: Include fold-const.h.
7676 * c-parser.c: Include stringpool.h.
7677 Include attribs.h.
7678 Include stor-layout.h.
7679 Include varasm.h.
7680 Include trans-mem.h.
7681 * c-typeck.c: Include stor-layout.h.
7682 Include trans-mem.h.
7683 Include varasm.h.
7684 Include stmt.h.
7685
38b7bc7f
JM
76862013-11-13 Joseph Myers <joseph@codesourcery.com>
7687
7688 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7689 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7690 __auto_type.
7691 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7692 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7693 RID_AUTO_TYPE.
7694 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7695 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7696 (c_parser_declarator, c_parser_direct_declarator_inner)
7697 (c_parser_parameter_declaration, c_parser_type_name): All callers
7698 changed.
7699 (c_parser_declaration_or_fndef): Handle declarations with type
7700 determined from the initializer.
7701
45b0be94
AM
77022013-11-12 Andrew MacLeod <amacleod@redhat.com>
7703
18f429e2 7704 * c-typeck.c: Include gimplify.h.
45b0be94 7705
582d9b50
JM
77062013-11-12 Joseph Myers <joseph@codesourcery.com>
7707
7708 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7709 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7710 comment.
7711 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7712 or _Thread_local as appropriate in diagnostics.
7713 (build_null_declspecs): Initialize ret->thread_gnu_p.
7714 (declspecs_add_scspec): Handle either __thread or _Thread_local
7715 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7716 pedantic. Do not disallow _Thread_local extern and _Thread_local
7717 static.
7718
267bac10
JM
77192013-11-07 Joseph Myers <joseph@codesourcery.com>
7720 Andrew MacLeod <amacleod@redhat.com>
7721
7722 * c-aux-info.c (gen_type): Handle atomic qualifier.
7723 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7724 qualifiers when compating types.
7725 (shadow_tag_warned): Handle atomic_p in declspecs.
7726 (quals_from_declspecs): Likewise.
7727 (start_decl): Use c_type_promotes_to when promoting argument
7728 types.
7729 (grokdeclarator): Handle _Atomic.
7730 (get_parm_info): Diagnose any qualifier on "void" as only
7731 parameter.
7732 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7733 comparing types. Use c_type_promotes_to when promoting argument
7734 types.
7735 (finish_function): Use c_type_promotes_to when promoting argument
7736 types.
7737 (build_null_declspecs): Handle atomic_p in declspecs.
7738 (declspecs_add_qual): Handle RID_ATOMIC.
7739 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7740 (c_token_starts_declspecs): Handle RID_ATOMIC.
7741 (c_parser_declspecs): Handle atomic type specifiers and
7742 qualifiers.
7743 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7744 from types of expressions with atomic type.
7745 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7746 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7747 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7748 (c_parser_statement_after_labels, c_parser_switch_statement)
7749 (c_parser_for_statement, c_parser_expr_no_commas)
7750 (c_parser_conditional_expression, c_parser_binary_expression)
7751 (c_parser_cast_expression, c_parser_unary_expression)
7752 (c_parser_postfix_expression)
7753 (c_parser_postfix_expression_after_primary, c_parser_expression):
7754 Use convert_lvalue_to_rvalue.
7755 (c_parser_expression_conv, c_parser_expr_list): Document
7756 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7757 (c_parser_objc_synchronized_statement): Use
7758 convert_lvalue_to_rvalue.
7759 (c_parser_objc_selector): Handle RID_ATOMIC.
7760 (c_parser_objc_receiver, c_parser_array_notation): Use
7761 convert_lvalue_to_rvalue.
7762 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7763 _Atomic (type-name).
7764 (struct c_declspecs): Add atomic_p field.
7765 (convert_lvalue_to_rvalue): Declare.
7766 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7767 corresponding atomic types.
7768 (qualify_type): Don't add _Atomic qualifiers from second argument.
7769 (comp_target_types): Do not allow _Atomic mismatches.
7770 (type_lists_compatible_p): Do not remove atomic qualifiers when
7771 comparing types.
7772 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7773 (build_atomic_assign): New functions.
7774 (build_unary_op): Use build_atomic_assign for atomic increment and
7775 decrement.
7776 (build_conditional_expr): Do not treat _Atomic void as a qualified
7777 version of void.
7778 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7779 (find_anonymous_field_with_type, convert_to_anonymous_field)
7780 (convert_for_assignment): Do not remove atomic qualifiers when
7781 comparing types.
7782 (digest_init): Do not accept initialization of arrays of atomic
7783 elements by string constants.
7784 (build_asm_expr): Use convert_lvalue_to_rvalue.
7785 (build_binary_op): Do not treat _Atomic void as a qualified
7786 version of void.
7787
0c249d4b
DD
77882013-11-06 DJ Delorie <dj@redhat.com>
7789
7790 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7791 both explicit and builtin, print the location of the explicit one.
7792
6d7f7e0a
TB
77932013-11-05 Tobias Burnus <burnus@net-b.de>
7794
7795 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7796 c_parser_omp_distribute, c_parser_omp_teams,
7797 c_parser_omp_target, c_parser_omp_declare): Handle
7798 -fopenmp-simd.
7799
b906f4ca
MP
78002013-11-03 Marek Polacek <polacek@redhat.com>
7801
7802 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7803
ee1d5a02
JJ
78042013-11-01 Jakub Jelinek <jakub@redhat.com>
7805
7806 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7807 check_dup_generic at the end, unless remove is true.
7808 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7809 remove = true;.
7810 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7811
5a9785fb
JJ
78122013-10-31 Jakub Jelinek <jakub@redhat.com>
7813
7814 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7815 with decl that is not pointer nor array.
7816
939b37da
BI
78172013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7818
7819 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7820 a spawning function is found.
7821 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7822 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7823 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7824 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7825 case.
7826 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7827 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7828 expr.
7829 (c_finish_return): Added a check to reject _Cilk_spawn in return
7830 expression.
7831 (build_cilk_spawn): New function.
7832 (build_cilk_sync): Likewise.
7833 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7834
d4af74d4
TB
78352013-10-27 Tobias Burnus <burnus@net-b.de>
7836
7837 PR other/33426
7838 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7839 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7840 (c_parser_statement_after_labels): Update calls.
7841
d73749df 78422013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7843
7844 PR other/33426
7845 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7846 Handle PRAGMA_IVDEP.
7847 (c_parser_statement_after_labels): Update call.
7848
f28aa681
MP
78492013-10-24 Marek Polacek <polacek@redhat.com>
7850
7851 * c-parser.c (c_parser_struct_declaration): Add a comment.
7852 (c_parser_declarator): Don't allow _Alignas here.
7853
0645c1a2
AM
78542013-10-17 Andrew MacLeod <amacleod@redhat.com>
7855
7856 * c-parser.c: Include omp-low.h.
7857 * c-typeck.c: Likewise.
7858
568a31f2
MP
78592013-10-17 Marek Polacek <polacek@redhat.com>
7860
7861 PR c/58267
7862 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7863 Document syntax of the array-declarator.
7864 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7865 are not permitted.
7866 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7867 (c_parser_struct_declaration): Likewise.
7868 (c_parser_declarator): Likewise.
7869 (c_parser_direct_declarator_inner): Likewise.
7870 (c_parser_parameter_declaration): Likewise.
7871 (c_parser_type_name): Likewise.
7872
acf0174b
JJ
78732013-10-11 Jakub Jelinek <jakub@redhat.com>
7874
7875 * c-lang.h (current_omp_declare_target_attribute): New extern
7876 decl.
7877 * c-parser.c: Include c-lang.h.
7878 (struct c_parser): Change tokens to c_token *.
7879 Add tokens_buf field. Change tokens_avail type to unsigned int.
7880 (c_parser_consume_token): If parser->tokens isn't
7881 &parser->tokens_buf[0], increment parser->tokens.
7882 (c_parser_consume_pragma): Likewise.
7883 (enum pragma_context): Add pragma_struct and pragma_param.
7884 (c_parser_external_declaration): Adjust
7885 c_parser_declaration_or_fndef caller.
7886 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7887 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7888 Adjust recursive call.
7889 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7890 of pragma_external.
7891 (c_parser_parameter_declaration): Use pragma_param instead of
7892 pragma_external.
7893 (c_parser_compound_statement_nostart, c_parser_label,
7894 c_parser_for_statement): Adjust
7895 c_parser_declaration_or_fndef callers.
7896 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7897 it through to c_parser_conditional_expression.
7898 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7899 pass it through to c_parser_binary_expression. Adjust recursive
7900 call.
7901 (c_parser_binary_expression): Remove prec argument, add
7902 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7903 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7904 binop matches it, use build2 instead of parser_build_binary_op.
7905 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7906 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7907 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7908 Handle pragma_struct and pragma_param the same as pragma_external.
7909 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7910 (c_parser_omp_variable_list): Parse array sections for
7911 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7912 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7913 (c_parser_omp_clause_reduction): Handle user defined reductions.
7914 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7915 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7916 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7917 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7918 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7919 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7920 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7921 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7922 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7923 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7924 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7925 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7926 (c_parser_omp_for_loop): Add CODE argument, pass it through
7927 to c_finish_omp_for. Change last argument to cclauses,
7928 and adjust uses to grab parallel clauses from the array of all
7929 the split clauses. Adjust c_parser_binary_expression,
7930 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7931 (omp_split_clauses): New function.
7932 (c_parser_omp_simd): New function.
7933 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7934 Allow the function to be called also when parsing combined constructs,
7935 and call c_parser_omp_simd when parsing for simd.
7936 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7937 #pragma omp section, require exactly one structured-block instead of
7938 sequence of statements.
7939 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7940 Allow the function to be called also when parsing combined constructs.
7941 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7942 Allow the function to be called also when parsing combined
7943 constructs.
7944 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7945 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7946 c_parser_omp_teams, c_parser_omp_target_data,
7947 c_parser_omp_target_update, c_parser_omp_target,
7948 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7949 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7950 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7951 (c_parser_omp_construct): Add p_name and mask vars. Handle
7952 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7953 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7954 and c_parser_omp_sections callers.
7955 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7956 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7957 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7958 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7959 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7960 OMP_CLAUSE_DEPEND.
7961 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7962 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7963 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7964 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7965 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7966 * c-typeck.c: Include tree-inline.h.
7967 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7968 handle_omp_array_sections_1, handle_omp_array_sections,
7969 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7970 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7971 user defined reductions.
7972 (c_tree_equal): New function.
7973 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7974 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7975 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7976 c_check_omp_declare_reduction_r): New prototypes.
7977 * c-decl.c (current_omp_declare_target_attribute): New variable.
7978 (c_decl_attributes): New function.
7979 (start_decl, start_function): Use it instead of decl_attributes.
7980 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7981 c_omp_reduction_decl, c_omp_reduction_lookup,
7982 c_check_omp_declare_reduction_r): New functions.
7983
0a6c2227
TT
79842013-09-25 Tom Tromey <tromey@redhat.com>
7985
7986 * Make-lang.in (c/gccspec.o): Remove.
7987 (CFLAGS-c/gccspec.o): New variable.
7988 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7989 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7990 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7991
f3bc55f0
TT
79922013-09-25 Tom Tromey <tromey@redhat.com>
7993
7994 * Make-lang.in (c/gccspec.o): Don't use subshell.
7995
a24d975c
MP
79962013-09-18 Marek Polacek <polacek@redhat.com>
7997
7998 PR sanitize/58443
7999 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8000 Remove unnecessary check.
8001
ce6923c5
MP
80022013-09-18 Marek Polacek <polacek@redhat.com>
8003
8004 PR sanitizer/58411
8005 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8006 no_sanitize_undefined attribute.
8007
a1e51df9
KT
80082013-09-13 Kai Tietz <ktietz@redhat.com>
8009
8010 PR target/57848
8011 * c-decl.c (c_builtin_function_ext_scope): Remove
8012 wrong assumption that it is never called on prexisting
8013 symbol.
8014
0af94e6f
JR
80152013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8016
8017 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8018
20059c8b
GDR
80192013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8020
8021 * c-objc-common.c (c_tree_printer): Tidy.
8022
de5a5fa1
MP
80232013-08-30 Marek Polacek <polacek@redhat.com>
8024
8025 * c-typeck.c (build_binary_op): Add division by zero and shift
8026 instrumentation.
8027
2531a1d9 80282013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8029 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8030
6e2bcc98 8031 PR c/35649
2531a1d9
JR
8032 * c-typeck.c (c_common_type): Prefer double_type_node over
8033 other REAL_TYPE types with the same precision.
8034 (convert_arguments): Likewise.
8035
025311c4
GDR
80362013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8037
8038 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8039 (c_initialize_diagnostics): Call a destructor for the early printer.
8040
da6ca2b5
GDR
80412013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8042
8043 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8044 printer initialization.
8045
318cda85 80462013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8047
318cda85
BI
8048 PR c/57490
8049 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8050 check for truth values.
8051 (expand_array_notation_exprs): Added truth values case. Removed an
8052 unwanted else. Added for-loop to walk through subtrees in default
8053 case.
8054
b066401f
GDR
80552013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8056
8057 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8058
fb48aadc
JM
80592013-07-23 Joseph Myers <joseph@codesourcery.com>
8060
8061 * c-parser.c (struct c_generic_association): Fix typo.
8062
433cc7b0
TT
80632013-07-23 Tom Tromey <tromey@redhat.com>
8064 Joseph Myers <joseph@codesourcery.com>
8065
8066 * c-parser.c (struct c_generic_association): New.
8067 (c_generic_association_d): New typedef.
8068 (c_parser_generic_selection): New function.
8069 (c_parser_postfix_expression): Handle RID_GENERIC.
8070
26d40c3d
JM
80712013-07-13 Jason Merrill <jason@redhat.com>
8072
8073 PR c++/57793
8074 * c-decl.c (finish_struct): Check for too-large class.
8075
ecdbd01a 80762013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8077
8078 PR c/57821
8079 * c-typeck.c (set_init_index): When folding, check for index overflow.
8080
1141ed3f
BI
80812013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8082
8083 * c-parser.c (c_parser_array_notation): Removed rejection of array
8084 notations in an array of function pointers.
8085
713b46fa
BI
80862013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8087
8088 * c-array-notation.c (make_triplet_val_inv): New function.
8089 (create_cmp_incr): Likewise.
8090 (create_array_refs): Likewise.
8091 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8092 Also modularized common parts between functions and called the function.
8093 (build_array_notation_expr): Likewise.
8094 (fix_conditional_array_notations_1): Likewise.
8095 (fix_array_notation_expr): Likewise.
8096 (fix_array_notation_call_expr): Likewise.
8097
92f20202
MP
80982013-06-18 Marek Polacek <polacek@redhat.com>
8099
8100 PR c/57630
8101 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8102
73a23b06
BI
81032013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8104
8105 * c-array-notation.c (build_array_notation_expr): Reject array notation
8106 mismatch between LHS and RHS even inside a call_expr. Also, removed
8107 a couple while statements that were dead code.
8108
00b8517d
BI
81092013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8110
8111 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8112 excessive precision expressions in function parameters. Also removed
8113 couple unwanted while statements.
8114
1509bdda
BI
81152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8116
8117 * c-array-notation.c (expand_array_notation_exprs): Added
8118 ARRAY_NOTATION_REF case.
ab20d992 8119
d60f1706
BI
81202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8121
8122 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8123 function to c-family/array-notation-common.c.
8124 (is_cilkplus_reduce_builtin): Likewise.
8125 (find_rank): Likewise.
8126 (extract_array_notation_exprs): Likewise.
8127 (replace_array_notations): Likewise.
8128 (find_inv_trees): Likewise.
8129 (replace_inv_trees): Likewise.
8130 (contains_array_notation_expr): Likewise.
8131 (find_correct_array_notation_type): Likewise.
8132 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8133 (struct inv_list): Moved this to c-family/array-notation-common.c.
8134 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8135
6d6efbb3
BI
81362013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8137
8138 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8139 reduction functions outside the for-loop. Added a check if the fundecl
8140 is non-NULL. Finally, removed an unwanted if-statement, and made the
8141 body unconditional.
8142
25c22937
BI
81432013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8144
8145 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8146 condition of the if-statement matches the rank of else-block and then-
8147 block when array notations are used.
8148 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8149 expression after the entire function body is parsed.
8150 (c_parser_expr_no_commas): Delayed creating array notation expressions
8151 to the end of function parsing.
8152 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8153 whole if-statement instead of just the condition.
ab20d992 8154 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8155
edd25645
BI
81562013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8157
8158 PR c/57474
8159 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8160 array to NULL_TREE if they are unused. Also added a check for the
8161 field to be NULL before its fields are used in future.
ab20d992 8162
065ce7f1
RO
81632013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8164
8165 PR bootstrap/57450
8166 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8167 (build_array_notation_expr): Likewise.
8168
36536d79
BI
81692013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8170
8171 * c-typeck.c (build_array_ref): Added a check to see if array's
8172 index is greater than one. If true, then emit an error.
8173 (build_function_call_vec): Exclude error reporting and checking
8174 for builtin array-notation functions.
8175 (convert_arguments): Likewise.
8176 (c_finish_return): Added a check for array notations as a return
8177 expression. If true, then emit an error.
8178 (c_finish_loop): Added a check for array notations in a loop
8179 condition. If true then emit an error.
8180 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8181 (build_binary_op): Added a check for array notation expr inside
8182 op1 and op0. If present, we call another function to find correct
8183 type.
8184 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8185 * c-parser.c (c_parser_compound_statement): Check if array
8186 notation code is used in tree, if so, then transform them into
8187 appropriate C code.
8188 (c_parser_expr_no_commas): Check if array notation is used in LHS
8189 or RHS, if so, then build array notation expression instead of
8190 regular modify.
8191 (c_parser_postfix_expression_after_primary): Added a check for
8192 colon(s) after square braces, if so then handle it like an array
8193 notation. Also, break up array notations in unary op if found.
8194 (c_parser_direct_declarator_inner): Added a check for array
8195 notation.
8196 (c_parser_compound_statement): Added a check for array notation in
8197 a stmt. If one is present, then expand array notation expr.
8198 (c_parser_if_statement): Likewise.
8199 (c_parser_switch_statement): Added a check for array notations in
8200 a switch statement's condition. If true, then output an error.
8201 (c_parser_while_statement): Similarly, but for a while.
8202 (c_parser_do_statement): Similarly, but for a do-while.
8203 (c_parser_for_statement): Similarly, but for a for-loop.
8204 (c_parser_unary_expression): Check if array notation is used in a
8205 pre-increment or pre-decrement expression. If true, then expand
8206 them.
8207 (c_parser_array_notation): New function.
8208 * c-array-notation.c: New file.
8209 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8210
cd192ccc
MS
82112013-05-23 Mike Stump <mikestump@comcast.net>
8212
8213 * c-typeck.c (convert_for_assignment): Handle references to memory
8214 spaces better.
8215
427b248d
JM
82162013-05-16 Jason Merrill <jason@redhat.com>
8217
8218 * Make-lang.in (cc1$(exeext)): Use link mutex.
8219
44d90fe1
PC
82202013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8221
8222 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8223 to simply use OPT_Wpointer_arith.
8224 (build_unary_op): Likewise.
8225
4e7d7b3d
JJ
82262013-04-03 Jakub Jelinek <jakub@redhat.com>
8227
8228 PR c/19449
8229 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8230 argument. If set, or it temporarily for parsing of the first
8231 argument into force_folding_builtin_constant_p.
8232 (c_parser_postfix_expression): Adjust callers.
8233
839b422f
RB
82342013-03-21 Richard Biener <rguenther@suse.de>
8235
8236 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8237 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8238
2ee028f1
MP
82392013-02-12 Marek Polacek <polacek@redhat.com>
8240
8241 PR c/44938
8242 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8243 origtypes to NULL.
8244
8824edff
JJ
82452013-01-24 Jakub Jelinek <jakub@redhat.com>
8246
8247 PR c/56078
8248 * c-typeck.c (set_nonincremental_init_from_string): If
8249 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8250 returned false.
8251 (process_init_element): Likewise.
8252
eadd3d0d
JJ
82532012-12-20 Jakub Jelinek <jakub@redhat.com>
8254
8255 PR c++/55619
8256 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8257 argument, don't call default_function_array_conversion
8258 nor c_fully_fold here.
8259 (c_parser_asm_statement): Adjust callers.
8260 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8261 and outputs here, and call default_function_array_conversion
8262 on inputs that don't need to be addressable.
8263
f8a93a2e
JJ
82642012-12-18 Jakub Jelinek <jakub@redhat.com>
8265
8266 PR c/39464
8267 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8268 warning require that both c_common_unsigned_type as well as
8269 c_common_signed_type is the same for both mvl and mvr types.
8270
9771b263
DN
82712012-11-16 Diego Novillo <dnovillo@google.com>
8272
8273 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8274
8275 * c-common.c: Use new vec API in vec.h.
8276 * c-common.h: Likewise.
8277 * c-gimplify.c: Likewise.
8278 * c-pragma.c: Likewise.
8279 * c-pretty-print.c: Likewise.
8280 * c-pretty-print.h: Likewise.
8281 * c-semantics.c: Likewise.
8282 * c-decl.c: Likewise.
8283 * c-parser.c: Likewise.
8284 * c-tree.h: Likewise.
8285 * c-typeck.c: Likewise.
8286
880661a4
JW
82872012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8288
8289 PR c++/54930
8290 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8291
077d1abe
MLI
82922012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8293
8294 PR c/53066
8295 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8296 shadows a function, unless the variable is a function or a
8297 pointer-to-function.
8298
3a785c97
JJ
82992012-10-12 Jakub Jelinek <jakub@redhat.com>
8300
8301 PR c/54381
8302 * c-parser.c (struct c_tree_loc_pair): Removed.
8303 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8304 add location_t * and tree * arguments, fill in array of 3
8305 sizeof_arg trees and corresponding locs.
8306 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8307 c_parser_expr_list callers.
8308 (c_parser_postfix_expression_after_primary): Likewise. Pass
8309 array of 3 sizeof_arg trees and locs (corresponding to first
8310 3 arguments) to sizeof_pointer_memaccess_warning.
8311
703c8606
LC
83122012-10-09 Lawrence Crowl <crowl@google.com>
8313
8314 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8315 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8316 hash table.
8317
5d9de0d0
PC
83182012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8319
8320 PR c++/54194
8321 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8322 call.
8323
a212e43f
MG
83242012-10-09 Marc Glisse <marc.glisse@inria.fr>
8325
8326 PR c++/54427
8327 * c-typeck.c: Include c-common.h.
8328 (enum stv_conv): Moved to c-common.h.
8329 (scalar_to_vector): Moved to c-common.c.
8330 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8331 * Make-lang.in: c-typeck.c depends on c-common.h.
8332
3b78de56
AC
83332012-10-04 Arnaud Charlet <charlet@adacore.com>
8334
8335 * c-decl.c (c_write_global_declarations): Fix handling of
8336 -fdump-ada-spec*.
8337
78c60e3d
SS
83382012-09-30 Sharad Singhai <singhai@google.com>
8339
8340 * c-decl.c (c_write_global_declarations): Use a different method
8341 to determine if the dump has ben initialized.
8342
9f33203d
JM
83432012-09-14 Joseph Myers <joseph@codesourcery.com>
8344
8345 PR c/54552
8346 * c-typeck.c (c_cast_expr): When casting to a type requiring
8347 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8348 c_fully_fold first.
8349
a27d595d
JM
83502012-09-14 Joseph Myers <joseph@codesourcery.com>
8351
8352 PR c/54103
8353 * c-typeck.c (build_unary_op): Pass original argument of
8354 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8355 any C_MAYBE_CONST_EXPR, if it has integer operands.
8356 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8357 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8358 to c_objc_common_truthvalue_conversion, then remove any
8359 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8360 c_objc_common_truthvalue_conversion not
8361 c_common_truthvalue_conversion.
8362 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8363 call note_integer_operands for arguments with integer operands
8364 that are not integer constants.
8365
9feb29df
JJ
83662012-09-13 Jakub Jelinek <jakub@redhat.com>
8367
8368 PR c/54559
8369 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8370 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8371
d409320c
JJ
83722012-08-31 Jakub Jelinek <jakub@redhat.com>
8373
8374 PR c/54428
8375 * c-convert.c (convert): Don't call fold_convert_loc if
8376 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8377 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8378 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8379
6265d07c
JJ
83802012-08-24 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR c/54355
8383 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8384 for nested and empty_ok arguments in the call to
8385 c_parser_declaration_or_fndef.
8386
1a4049e7
JJ
83872012-08-17 Jakub Jelinek <jakub@redhat.com>
8388
8389 * c-tree.h (c_last_sizeof_arg): Declare.
8390 * c-parser.c (struct c_tree_loc_pair): New type.
8391 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8392 non-NULL.
8393 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8394 (c_parser_postfix_expression_after_primary): Likewise. Call
8395 sizeof_pointer_memaccess_warning if needed.
8396 (sizeof_ptr_memacc_comptypes): New function.
8397 * c-typeck.c (c_last_sizeof_arg): New global variable.
8398 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8399
0229aee9
UB
84002012-07-24 Uros Bizjak <ubizjak@gmail.com>
8401
8402 * c-lang.h (lang_decl): Add variable_size GTY option.
8403
7ee2468b
SB
84042012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8405
8406 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8407 * Make-lang.in: Fix dependencies.
8408
d4a10d0a
SB
84092012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8410
8411 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8412 and add language Makefile hooks.
8413 * config-lang.in: New file.
8414 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8415 add the required "normal" config-lang.in rules.
8416 * c-lang.h: Moved from gcc/ to here.
8417 * c-tree.h: Likewise.
8418 * c-objc-common.c: Likewise.
8419 * c-objc-common.h: Likewise.
8420 * c-typeck.c: Likewise.
8421 * c-convert.c: Likewise.
8422 * c-lang.c: Likewise.
8423 * c-aux-info.c: Likewise.
8424 * c-errors.c: Likewise.
8425 * gccspec.c: Likewise.
8426 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8427 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8428\f
877e3c2a 8429Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8430
8431Copying and distribution of this file, with or without modification,
8432are permitted in any medium without royalty provided the copyright
8433notice and this notice are preserved.