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