]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
c++: fix ICE on invalid attributes [PR96637]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
768f49a2
GA
12022-05-24 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/105378
4 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
5
1cda629f
GA
62022-05-18 Marek Polacek <polacek@redhat.com>
7
8 PR c/105131
9 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
10 mismatches.
11 * c-tree.h (comptypes_check_enum_int): Declare.
12 * c-typeck.cc (comptypes): No longer static.
13
3d9439b1
GA
142022-05-17 Marek Polacek <polacek@redhat.com>
15
16 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
17 its value.
18
192022-05-17 Jakub Jelinek <jakub@redhat.com>
20
21 * c-parser.cc (c_parser_omp_clause_depend): Parse
22 inoutset depend-kind.
23 (c_parser_omp_depobj): Likewise.
24
702bd11f
GA
252022-05-16 Martin Liska <mliska@suse.cz>
26
27 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
28
49ace834
GA
292022-05-12 Jakub Jelinek <jakub@redhat.com>
30
31 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
32 if flag_openmp.
33 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
34 in postfix expressions.
35 (c_parser_omp_variable_list): Handle omp_all_memory in depend
36 clause.
37 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
38 keyword in depend clause as null_pointer_node, diagnose invalid
39 uses.
40
bd022ff9
GA
412022-05-09 Martin Liska <mliska@suse.cz>
42
43 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
44 macros.
45 (c_parser_binary_expression): Likewise.
46
a1947c92
GA
472022-05-07 Marek Polacek <polacek@redhat.com>
48
49 PR c++/101833
50 PR c++/47634
51 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
52
405eda0d
GA
532022-04-08 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/105149
56 * c-typeck.cc (c_build_va_arg): Reject function types.
57
a2287813
GA
582022-03-22 Marek Polacek <polacek@redhat.com>
59
60 PR c/82283
61 PR c/84685
62 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
63 (start_init): Set it.
64 (finish_init): Restore constructor_designated.
65 (push_init_level): Set constructor_designated to the value of
66 constructor_designated in the upper constructor_stack.
67
57eeedda
GA
682022-03-12 Thomas Schwinge <thomas@codesourcery.com>
69
70 PR other/65095
71 * c-typeck.cc (handle_omp_array_sections_1)
72 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
73 instead of 'c_omp_map_clause_name'.
74
8cc4f9cd
GA
752022-03-09 Joseph Myers <joseph@codesourcery.com>
76
77 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
78 differently from earlier standards for unprototyped function type
79 compatibility.
80
812022-03-09 Jakub Jelinek <jakub@redhat.com>
82
83 PR c/104711
84 * c-fold.cc (c_fully_fold_internal): Don't emit
85 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
86 * c-typeck.cc (build_binary_op): Likewise.
87
e6533e2e
GA
882022-03-07 Jakub Jelinek <jakub@redhat.com>
89
90 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
91 literal.
92
4bf3bac1
GA
932022-02-23 Richard Biener <rguenther@suse.de>
94
95 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
96 SSA names without definition.
97 (c_parser_gimple_declaration): Handle pointer typed SSA names.
98
0bdb0498
GA
992022-02-17 Jakub Jelinek <jakub@redhat.com>
100
101 PR c/104532
102 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
103 convert_lvalue_to_rvalue and build_indirect_ref instead of
104 build_simple_mem_ref.
105
e8d68f0a
GA
1062022-02-11 Richard Biener <rguenther@suse.de>
107
108 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
109 VEC_COND_EXPRs.
110
a645583d
GA
1112022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
112
113 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
114 clause.
115 (c_parser_omp_variable_list): Handle array sections.
116 (c_parser_omp_clause_has_device_addr): Added.
117 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
118 case.
119 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
120 OMP_CLAUSE_MASK.
121 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
122 (c_finish_omp_clauses): Handle array sections.
123
3adf509f
GA
1242022-02-09 Jakub Jelinek <jakub@redhat.com>
125
126 PR c/104427
127 * c-parser.cc (c_parser_postfix_expression)
128 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
129 instead of build1_loc to build PAREN_EXPR.
130 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
131 * c-fold.cc (c_fully_fold_internal): Likewise.
132
fc829782
GA
1332022-01-17 Martin Liska <mliska@suse.cz>
134
135 * Make-lang.in: Rename .c names to .cc.
136 * c-convert.cc: Likewise.
137 * c-decl.cc (struct lang_identifier): Likewise.
138 (pop_scope): Likewise.
139 (finish_decl): Likewise.
140 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
141 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
142 * c-parser.h (GCC_C_PARSER_H): Likewise.
143 * c-tree.h (c_keyword_starts_typename): Likewise.
144 (finish_declspecs): Likewise.
145 (c_get_alias_set): Likewise.
146 (enum c_oracle_request): Likewise.
147 (tag_exists_p): Likewise.
148 (set_c_expr_source_range): Likewise.
149 * c-typeck.cc (c_common_type): Likewise.
150 (c_finish_omp_clauses): Likewise.
151 * config-lang.in: Likewise.
152
1532022-01-17 Martin Liska <mliska@suse.cz>
154
155 * c-aux-info.c: Moved to...
156 * c-aux-info.cc: ...here.
157 * c-convert.c: Moved to...
158 * c-convert.cc: ...here.
159 * c-decl.c: Moved to...
160 * c-decl.cc: ...here.
161 * c-errors.c: Moved to...
162 * c-errors.cc: ...here.
163 * c-fold.c: Moved to...
164 * c-fold.cc: ...here.
165 * c-lang.c: Moved to...
166 * c-lang.cc: ...here.
167 * c-objc-common.c: Moved to...
168 * c-objc-common.cc: ...here.
169 * c-parser.c: Moved to...
170 * c-parser.cc: ...here.
171 * c-typeck.c: Moved to...
172 * c-typeck.cc: ...here.
173 * gccspec.c: Moved to...
174 * gccspec.cc: ...here.
175 * gimple-parser.c: Moved to...
176 * gimple-parser.cc: ...here.
177
1782022-01-17 Andrew Stubbs <ams@codesourcery.com>
179
180 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
181
617db51d
GA
1822022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
183
184 PR c++/103705
185 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
186 outer node for ARRAY_REFs.
187
62eb5308
GA
1882022-01-01 Jakub Jelinek <jakub@redhat.com>
189
190 PR objc/103639
191 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
192 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
193
2554e2da
GA
1942021-12-17 Marek Polacek <polacek@redhat.com>
195
196 PR c/103649
197 * c-decl.c (c_warn_unused_attributes): Don't warn for
198 attribute_ignored_p.
199 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
200 arguments when the attribute is ignored.
201
9c6586bc
GA
2022021-12-14 Jakub Jelinek <jakub@redhat.com>
203
204 PR c/103587
205 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
206 consume the pragma and silently skip to the pragma eol.
207
c8dcf64b
GA
2082021-12-12 Jonathan Wakely <jwakely@redhat.com>
209
210 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
211 * c-parser.c: Likewise.
212
4b4839e3
GA
2132021-12-09 Jakub Jelinek <jakub@redhat.com>
214
215 PR pch/71934
216 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
217 to resort_data.new_value.
218
641ff219
GA
2192021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
220
221 * c-parser.c (struct omp_dim): New struct type for use inside
222 c_parser_omp_variable_list.
223 (c_parser_omp_variable_list): Allow multiple levels of array and
224 component accesses in array section base-pointer expression.
225 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
226 c_parser_omp_var_list_parens.
227 (c_parser_omp_clause_from): Likewise.
228 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
229 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
230 POINTER_PLUS_EXPR.
231 (c_finish_omp_clauses): Extend allowed ranged of expressions
232 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
233
2342021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
235
236 PR middle-end/92120
237 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
238 call to c_parser_omp_variable_list to 'true'.
239 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
240 array base handling.
241 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
242
c177e806
GA
2432021-11-30 Thomas Schwinge <thomas@codesourcery.com>
244
245 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
246 orphan loop" checking.
247
2482021-11-30 Cesar Philippidis <cesar@codesourcery.com>
249 Thomas Schwinge <thomas@codesourcery.com>
250
251 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
252 OpenACC gang reductions.
253
2542021-11-30 Richard Biener <rguenther@suse.de>
255
256 * gimple-parser.c (c_parser_gimple_postfix_expression):
257 avoid unreachable code after break.
258
87cd82c8
GA
2592021-11-29 Eric Gallager <egallager@gcc.gnu.org>
260
261 PR other/103021
262 * Make-lang.in: Use ETAGS variable in TAGS target.
263
2642021-11-29 Richard Biener <rguenther@suse.de>
265
266 * c-typeck.c (c_tree_equal): Remove unreachable return.
267 * c-parser.c (get_matching_symbol): Likewise.
268
e1d43592
GA
2692021-11-23 Jakub Jelinek <jakub@redhat.com>
270
271 * c-typeck.c (c_clone_omp_udr): Don't initialize
272 id.transform_lang_insert_block.
273
9c077398
GA
2742021-11-19 Martin Sebor <msebor@redhat.com>
275
276 PR c++/33925
277 PR c/102867
278 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
279 code resulting from macro expansion.
280
2812021-11-19 Martin Liska <mliska@suse.cz>
282
283 Revert:
284 2021-11-19 Martin Liska <mliska@suse.cz>
285
286 * c-parser.c (add_debug_begin_stmt): Use option directly.
287
483092d3
GA
2882021-11-18 Matthias Kretz <m.kretz@gsi.de>
289
290 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
291 * c-parser.c (c_parser_postfix_expression): Likewise.
292
2932021-11-18 Martin Liska <mliska@suse.cz>
294
295 * c-parser.c (add_debug_begin_stmt): Use option directly.
296
280d2838
GA
2972021-11-17 Martin Sebor <msebor@redhat.com>
298
299 PR c/101702
300 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
301 bounds before deciding if they're constant.
302
e2b57363
GA
3032021-11-15 Jakub Jelinek <jakub@redhat.com>
304
305 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
306 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
307
b39265d4
GA
3082021-11-11 Jakub Jelinek <jakub@redhat.com>
309
310 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
311 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
312 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
313 OMP_CLAUSE_NUM_TEAMS_EXPR.
314 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
315 combined target teams even lower-bound expression.
316
3172021-11-11 Richard Biener <rguenther@suse.de>
318
319 * gimple-parser.c: Shuffle bitmap.h include.
320
18ae471f
GA
3212021-11-03 Joseph Myers <joseph@codesourcery.com>
322
323 PR c/103031
324 * c-convert.c (c_convert): New function, based on convert.
325 (convert): Make into wrapper of c_convert.
326 (convert_init): New function.
327 * c-typeck.c (enum impl_conv): Add ic_init_const.
328 (convert_for_assignment): Handle ic_init_const like ic_init. Add
329 new argument to convert_and_check call.
330 (digest_init): Pass ic_init_const to convert_for_assignment for
331 initializers required to be constant.
332
b4df2dd3
GA
3332021-11-02 Richard Sandiford <richard.sandiford@arm.com>
334
335 * c-tree.h (c_simulate_record_decl): Declare.
336 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
337 * c-decl.c (c_simulate_record_decl): New function.
338
c2bd5d8a
GA
3392021-10-22 Eric Gallager <egallager@gcc.gnu.org>
340
341 PR other/102663
342 * Make-lang.in: Add dummy c.install-dvi target.
343
93d183a5
GA
3442021-10-15 Richard Biener <rguenther@suse.de>
345
346 PR c/102763
347 * gimple-parser.c
348 (c_parser_gimple_postfix_expression_after_primary): Check
349 for a pointer do be dereferenced by ->.
350
5d5885c9
GA
3512021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
352
353 * c-parser.c (c_finish_omp_declare_variant): Change call from
354 c_omp_check_context_selector to omp_check_context_selector. Change
355 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
356
c9db17b8
GA
3572021-10-09 Jakub Jelinek <jakub@redhat.com>
358
359 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
360 (c_parser_omp_scan_loop_body): Use it.
361 (c_parser_omp_sections_scope): Likewise.
362
50e20ee6
GA
3632021-10-07 Richard Biener <rguenther@suse.de>
364
365 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
366
bb6194e0
GA
3672021-10-05 Richard Biener <rguenther@suse.de>
368
369 PR c/102605
370 * gimple-parser.c (c_parser_gimple_postfix_expression):
371 Accept more address _Literals.
372
da9c5f78
GA
3732021-10-04 Marek Polacek <polacek@redhat.com>
374
375 PR c++/97573
376 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
377
9d116bcc
GA
3782021-10-01 Martin Sebor <msebor@redhat.com>
379
380 PR c/102103
381 * c-typeck.c (maybe_warn_for_null_address): New function.
382 (build_binary_op): Call it.
383
3842021-10-01 Jakub Jelinek <jakub@redhat.com>
385 Richard Biener <rguenther@suse.de>
386
387 PR sanitizer/102515
388 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
389 for division even for SANITIZE_SI_OVERFLOW.
390
3912021-10-01 Jakub Jelinek <jakub@redhat.com>
392
393 * c-parser.c (c_parser_omp_clause_order): Set
394 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
395
fd133479
GA
3962021-09-28 Andrew Pinski <apinski@marvell.com>
397
398 PR c/32122
399 * c-parser.c (c_parser_statement_after_labels): Pass
400 the c_expr instead of the tree to c_finish_goto_ptr.
401 * c-typeck.c (c_finish_goto_ptr): Change the second
402 argument type to c_expr.
403 * c-tree.h (c_finish_goto_ptr): Likewise.
404 Error out if the expression was not of a pointer type.
405
e4777439
GA
4062021-09-22 Jakub Jelinek <jakub@redhat.com>
407
408 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
409 modifiers.
410
cf74e7b5
GA
4112021-09-18 Jakub Jelinek <jakub@redhat.com>
412
413 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
414 and reproducible modifiers.
415 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
416
4172021-09-18 Jakub Jelinek <jakub@redhat.com>
418
419 * c-parser.c (c_parser_omp_clause_default): Handle private and
420 firstprivate arguments, adjust diagnostics on unknown argument.
421
0a4cb439
GA
4222021-09-17 Jakub Jelinek <jakub@redhat.com>
423
424 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
425 is true.
426
a26206ec
GA
4272021-09-10 Jakub Jelinek <jakub@redhat.com>
428
429 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
430 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
431 don't call build_conditional_expr, instead build a COND_EXPR directly.
432 (c_parser_binary_expression): Avoid calling parser_build_binary_op
433 if omp_atomic_lhs even in more cases for >, < or ==.
434 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
435 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
436 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
437 * c-typeck.c (build_binary_op): For flag_openmp only handle
438 MIN_EXPR/MAX_EXPR.
439
b2748138
GA
4402021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
441
442 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
443 directive.
444
e11c6046
GA
4452021-09-01 Iain Sandoe <iain@sandoe.co.uk>
446
447 * c-decl.c (enum deprecated_states): Add unavailable state.
448 (merge_decls): Copy unavailability.
449 (quals_from_declspecs): Handle unavailable case.
450 (start_decl): Amend the logic handling suppression of nested
451 deprecation states to include unavailability.
452 (smallest_type_quals_location): Amend comment.
453 (grokdeclarator): Handle the unavailable deprecation state.
454 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
455 * c-tree.h (struct c_declspecs): Add unavailable_p.
456 * c-typeck.c (build_component_ref): Handle unavailability.
457 (build_external_ref): Likewise.
458
4592021-09-01 Roger Sayle <roger@nextmovesoftware.com>
460 Joseph Myers <joseph@codesourcery.com>
461
462 PR c/79412
463 * c-decl.c (duplicate_decls): On significant mismatches, mark the
464 types of both (non-function) decls as error_mark_node, so that the
465 middle-end can see the code is malformed.
466 (free_attr_access_data): Don't process if the type has been set to
467 error_mark_node.
468
6d51ee43
GA
4692021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
470
471 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
472 and 'ancestor' in 'target device' clauses.
473
38b19c5b
GA
4742021-08-23 Jakub Jelinek <jakub@redhat.com>
475
476 * c-parser.c (c_parser_omp_clause_num_tasks,
477 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
478
5b2876f9
GA
4792021-08-22 Martin Uecker <muecker@gwdg.de>
480
481 PR c/98397
482 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
483 for pointers to arrays with qualifiers.
484 (build_conditional_expr): For C23 don't lose qualifiers for pointers
485 to arrays when the other pointer is a void pointer. Update warnings.
486 (convert_for_assignment): Update warnings for C2X when converting from
487 void* with qualifiers to a pointer to array with the same qualifiers.
488
7c9e1645
GA
4892021-08-20 Jakub Jelinek <jakub@redhat.com>
490
491 * c-parser.c (c_parser_omp_error): New function.
492 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
493
4942021-08-20 Jakub Jelinek <jakub@redhat.com>
495
496 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
497 comma at the end of list.
498 (c_parser_omp_requires): Likewise.
499
b57fba5e
GA
5002021-08-19 Jakub Jelinek <jakub@redhat.com>
501
502 * c-parser.c (c_parser_omp_requires): Don't call
503 c_parser_peek_2nd_token and optionally consume token if current
504 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
505
6e529985
GA
5062021-08-18 Jakub Jelinek <jakub@redhat.com>
507
508 * c-parser.c (c_parser_omp_nothing): New function.
509 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
510
5112021-08-18 Jakub Jelinek <jakub@redhat.com>
512
513 * c-parser.c (c_parser_statement_after_labels): Add restart label
514 near the start of the function. If c_parser_pragma returns false,
515 goto restart.
516 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
517 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
518 return what c_parser_omp_declare returned. Return true instead of
519 false after emitting errors that the directive is not allowed in
520 pragma_stmt context.
521 (c_parser_omp_ordered): Return true instead of
522 false after emitting errors that the directive is not allowed in
523 pragma_stmt context.
524 (c_parser_omp_target_update): Likewise.
525 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
526 Change return type from tree to bool, return false if the
527 directive should be ignored in pragma_stmt contexts.
528 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
529 return their result directly.
530 (c_parser_omp_cancellation_point): Change return type from void to
531 bool, return false if the directive should be ignored in pragma_stmt
532 contexts.
533 (c_parser_omp_declare): Likewise.
534
2d14d64b
GA
5352021-08-17 Jakub Jelinek <jakub@redhat.com>
536
537 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
538 (c_parser_omp_scope): New function.
539 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
540
72be20e2
GA
5412021-08-12 Jakub Jelinek <jakub@redhat.com>
542
543 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
544 (c_parser_omp_clause_filter): New function.
545 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
546 (OMP_MASKED_CLAUSE_MASK): Define.
547 (c_parser_omp_masked): New function.
548 (c_parser_omp_parallel): Handle parallel masked.
549 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
550 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
551
5522021-08-12 Martin Uecker <muecker@gwdg.de>
553
554 PR c/101838
555 PR c/29970
556 * c-typeck.c (c_expr_sizeof_type): Evaluate
557 size expressions for structs of variable size.
558
5592021-08-12 Tobias Burnus <tobias@codesourcery.com>
560
561 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
562 'primary' as alias for 'master'.
563
3ae564ea
GA
5642021-08-10 Martin Uecker <muecker@gwdg.de>
565
566 PR c/29970
567 * c-typeck.c (c_expr_sizeof_expr): Evaluate
568 size expressions for structs of variable size.
569
f92f4778
GA
5702021-08-06 Tamar Christina <tamar.christina@arm.com>
571
572 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
573 * c-tree.h (c_simulate_enum_decl): Likewise.
574
5752021-08-06 Martin Sebor <msebor@redhat.com>
576
577 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
578 vec arguments to by-reference.
579 (c_finish_omp_declare_simd): Same.
580 (c_parser_compound_statement_nostart): Same.
581 (c_parser_for_statement): Same.
582 (c_parser_objc_methodprotolist): Same.
583 (c_parser_oacc_routine): Same.
584 (c_parser_omp_for_loop): Same.
585 (c_parser_omp_declare_simd): Same.
586
419c6c68
GA
5872021-07-21 Thomas Schwinge <thomas@codesourcery.com>
588 Joseph Myers <joseph@codesourcery.com>
589 Cesar Philippidis <cesar@codesourcery.com>
590
591 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
592 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
593 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
594 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
595
92d45509
GA
5962021-07-20 Martin Sebor <msebor@redhat.com>
597
598 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
599 by-const-reference.
600 * c-typeck.c (c_build_function_call_vec): Same.
601
d97d71a1
GA
6022021-07-15 Martin Sebor <msebor@redhat.com>
603
604 PR c/101289
605 PR c/97548
606 * c-decl.c (get_parm_array_spec): Strip nops.
607
6fba0eea
GA
6082021-07-06 Martin Sebor <msebor@redhat.com>
609
610 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
611
7a60a6e8
GA
6122021-07-02 Jakub Jelinek <jakub@redhat.com>
613
614 PR c/101297
615 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
616 appears before a CPP_NAME.
617
90708f87
GA
6182021-06-25 Martin Sebor <msebor@redhat.com>
619
620 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
621 warning_suppressed_p, suppress_warning, and copy_no_warning.
622 (diagnose_mismatched_decls): Same.
623 (duplicate_decls): Same.
624 (grokdeclarator): Same.
625 (finish_function): Same.
626 (c_write_global_declarations_1): Same.
627 * c-fold.c (c_fully_fold_internal): Same.
628 * c-parser.c (c_parser_expr_no_commas): Same.
629 (c_parser_postfix_expression): Same.
630 * c-typeck.c (array_to_pointer_conversion): Same.
631 (function_to_pointer_conversion): Same.
632 (default_function_array_conversion): Same.
633 (convert_lvalue_to_rvalue): Same.
634 (default_conversion): Same.
635 (build_indirect_ref): Same.
636 (build_function_call_vec): Same.
637 (build_atomic_assign): Same.
638 (build_unary_op): Same.
639 (c_finish_return): Same.
640 (emit_side_effect_warnings): Same.
641 (c_finish_stmt_expr): Same.
642 (c_omp_clause_copy_ctor): Same.
643
9aa8327e
GA
6442021-06-24 Jakub Jelinek <jakub@redhat.com>
645
646 PR c/101176
647 * c-parser.c (c_parser_has_attribute_expression): Set source range for
648 the result.
649
6502021-06-24 Jakub Jelinek <jakub@redhat.com>
651
652 PR c/101171
653 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
654 error_mark_node.
655
6562021-06-24 Jakub Jelinek <jakub@redhat.com>
657
658 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
659 C_ORT_OMP for clauses on target construct.
660 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
661 (c_parser_omp_target): For non-combined target add
662 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
663 C_ORT_OMP_TARGET to c_finish_omp_clauses.
664 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
665 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
666 never present on C_ORT_*DECLARE_SIMD.
667 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
668 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
669 corresponding map clauses.
670
2f080224
GA
6712021-06-21 Jakub Jelinek <jakub@redhat.com>
672
673 PR inline-asm/100785
674 * c-typeck.c (c_mark_addressable): Diagnose trying to make
675 bit-fields addressable.
676
ede6c356
GA
6772021-06-15 Robin Dapp <rdapp@linux.ibm.com>
678
679 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
680 similar.
681
8dc48181
GA
6822021-06-14 Tobias Burnus <tobias@codesourcery.com>
683
684 PR c/100913
685 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
686 var in the error case.
687
438aac59
GA
6882021-06-07 Eric Botcazou <ebotcazou@adacore.com>
689
690 PR c/100920
691 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
692 spot built-in functions.
693
7d6987e9
GA
6942021-06-06 Jakub Jelinek <jakub@redhat.com>
695
696 PR c/100902
697 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
698 even when target is combined with other constructs.
699
7002021-06-06 Eric Botcazou <ebotcazou@adacore.com>
701
702 PR c/100920
703 * c-decl.c (finish_struct): Fix thinko in previous change.
704 * c-typeck.c (convert_for_assignment): Do not warn on pointer
705 assignment and initialization for storage order purposes if the
706 RHS is a call to a DECL_IS_MALLOC function.
707
600f90cb
GA
7082021-06-04 Martin Sebor <msebor@redhat.com>
709
710 PR c/100783
711 * c-objc-common.c (print_type): Handle erroneous types.
712
440c8a0a
GA
7132021-06-03 Jakub Jelinek <jakub@redhat.com>
714
715 PR c++/100859
716 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
717 after depend only cases.
718
ee682192
GA
7192021-05-31 Richard Biener <rguenther@suse.de>
720
721 PR c++/88601
722 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
723 * c-parser.c (c_parser_postfix_expression): Likewise.
724
48166757
GA
7252021-05-28 Richard Biener <rguenther@suse.de>
726
727 PR c/100803
728 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
729 invalid if conditions.
730
7312021-05-28 Jakub Jelinek <jakub@redhat.com>
732
733 PR middle-end/99928
734 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
735 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
736 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
737 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
738 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
739 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
740 if present in map_head, map_field_head or map_firstprivate_head
741 bitmaps.
742
7432021-05-28 Tobias Burnus <tobias@codesourcery.com>
744
745 * c-parser.c (c_parser_omp_clause_affinity): New.
746 (c_parser_omp_clause_name, c_parser_omp_variable_list,
747 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
748 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
749 c_finish_omp_clauses): Likewise.
750
01c59ef2
GA
7512021-05-26 Eric Botcazou <ebotcazou@adacore.com>
752
753 PR c/100653
754 * c-decl.c (finish_struct): Warn for a union containing an aggregate
755 field with a differing scalar storage order.
756
2832d51b
GA
7572021-05-21 Jakub Jelinek <jakub@redhat.com>
758
759 PR middle-end/99928
760 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
761 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
762 if a decl is mentioned both in map clause and in such firstprivate
763 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
764
65f32e5d
GA
7652021-05-19 Jakub Jelinek <jakub@redhat.com>
766
767 PR middle-end/99928
768 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
769 master when combined with taskloop.
770 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
771 parallel master when not combined with taskloop.
772
a8daf9a1
GA
7732021-05-18 Richard Biener <rguenther@suse.de>
774
775 PR c/100522
776 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
777 Diagnose calls to non-functions.
778 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
779
a7ffc1ef
GA
7802021-05-17 Richard Biener <rguenther@suse.de>
781
782 PR c/100625
783 * gimple-parser.c (c_parser_gimple_label): Avoid building
784 a GIMPLE label with NULL label decl.
785
f9af11c7
GA
7862021-05-13 Martin Sebor <msebor@redhat.com>
787
788 PR c/100550
789 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
790
0ff3a0f2
GA
7912021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
792
793 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
794 'close'.
795
aa891c56
GA
7962021-05-10 Martin Liska <mliska@suse.cz>
797
798 * c-aux-info.c (affix_data_type): Use startswith
799 function instead of strncmp.
800 * c-typeck.c (build_function_call_vec): Likewise.
801 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
802
62d87a32
GA
8032021-05-07 Eric Botcazou <ebotcazou@adacore.com>
804
805 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
806 on the address of a pointer field in a record with reverse SSO.
807
99e8df7a
GA
8082021-05-04 Tobias Burnus <tobias@codesourcery.com>
809
810 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
811 for || and && reductions.
812
3c8e539d
GA
8132021-04-29 Joseph Myers <joseph@codesourcery.com>
814
815 * c-typeck.c (function_types_compatible_p): For C2X, treat
816 unprototyped function as compatible with non-variadic prototyped
817 function even if some argument types are changed by the default
818 argument promotions.
819
ee351f7f
GA
8202021-04-15 Martin Sebor <msebor@redhat.com>
821
822 PR c/99420
823 PR c/99972
824 * c-decl.c (pushdecl): Always propagate type attribute.
825
8262021-04-15 Richard Sandiford <richard.sandiford@arm.com>
827
828 PR c/98852
829 * c-typeck.c (c_common_type): Do not drop attributes that
830 affect type identity.
831
1d54b138
GA
8322021-04-10 Jakub Jelinek <jakub@redhat.com>
833
834 PR c/99990
835 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
836 error_mark_node.
837
4493b1c1
GA
8382021-03-25 Jakub Jelinek <jakub@redhat.com>
839
840 PR c++/99565
841 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
842 to operand_equal_p.
843
5f256a70
GA
8442021-03-19 Jakub Jelinek <jakub@redhat.com>
845
846 PR c/99588
847 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
848 with modifycode NOP_EXPR produces and mark the _Atomic var as read
849 if found.
850 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
851 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
852 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
853
3c5b6d24
GA
8542021-03-15 Tobias Burnus <tobias@codesourcery.com>
855
856 PR c++/99509
857 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
858 ensure that the varpool node is marked as offloadable.
859
ceae9533
GA
8602021-03-05 Tobias Burnus <tobias@codesourcery.com>
861
862 PR c/99137
863 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
864
4028d01a
GA
8652021-02-24 Martin Sebor <msebor@redhat.com>
866
867 PR middle-end/97172
868 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
869
bf81237e
GA
8702021-02-18 Jakub Jelinek <jakub@redhat.com>
871
872 PR c/99136
873 * c-typeck.c (c_finish_return): Don't wrap retval into
874 EXCESS_PRECISION_EXPR in functions that return void.
875
0c5cdb31
GA
8762021-02-11 Marek Polacek <polacek@redhat.com>
877
878 * c-parser.c (c_parser_if_statement): Use vec_free.
879
a19dd5e6
GA
8802021-02-04 Martin Sebor <msebor@redhat.com>
881
882 PR c/97882
883 * c-decl.c (locate_old_decl): Add type to diagnostic output.
884 (diagnose_mismatched_decls): Same.
885 (start_function): Introduce temporaries for better readability.
886 * c-typeck.c (comptypes_internal): Only consider complete enum
887 types in comparisons with integers.
888
f7884fb1
GA
8892021-02-01 Martin Sebor <msebor@redhat.com>
890
891 PR middle-end/97172
892 * c-decl.c (free_attr_access_data): New function.
893 (c_parse_final_cleanups): Call free_attr_access_data.
894
59cf67d1
GA
8952021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
896
897 * c-parser.c (c_parser_omp_clause_detach): New.
898 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
899 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
900 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
901 clause. Prevent use of detach with mergeable and overriding the
902 data sharing mode of the event handle.
903
2f7f0d32
GA
9042021-01-15 Jakub Jelinek <jakub@redhat.com>
905
906 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
907 unqualified element type and then call c_build_qualified_type on the
908 ARRAY_TYPE.
909
7d187e4f
GA
9102021-01-07 Richard Biener <rguenther@suse.de>
911
912 * gimple-parser.c (c_parser_gimple_compound_statement): Only
913 reallocate loop array if it is too small.
914
eefe499f
GA
9152020-12-16 Martin Uecker <muecker@gwdg.de>
916
917 PR c/98047
918 * c-typeck.c (build_modify_expr): Drop qualifiers.
919
9202020-12-16 Martin Uecker <muecker@gwdg.de>
921
922 PR c/98260
923 * c-parser.c (c_parser_expression): Look into
924 nop expression when marking expressions as read.
925
d52945ce
GA
9262020-12-14 Martin Liska <mliska@suse.cz>
927
928 PR sanitizer/98204
929 * c-typeck.c (pointer_diff): Do not emit a top-level
930 sanitization.
931 (build_binary_op): Likewise.
932
ca2bd949
GA
9332020-12-09 Tobias Burnus <tobias@codesourcery.com>
934
935 * c-parser.c (c_parser_omp_allocate): New.
936 (c_parser_omp_construct): Call it.
937
9382020-12-09 Richard Biener <rguenther@suse.de>
939
940 PR c/98200
941 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
942 early on error.
943
bc8a7013
GA
9442020-12-07 Martin Uecker <muecker@gwdg.de>
945
946 PR c/97981
947 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
948 that drops qualifiers to the end of the function.
949
d48df6f2
GA
9502020-11-26 Martin Uecker <muecker@gwdg.de>
951
952 PR c/65455
953 PR c/92935
954 * c-parser.c (c_parser_declaration_or_fndef): Remove
955 redundant code to drop qualifiers of _Atomic types for __auto_type.
956 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
957 types for __typeof__.
958
1e2c9a27
GA
9592020-11-24 Jakub Jelinek <jakub@redhat.com>
960
961 PR c/97958
962 * c-parser.c (c_parser_binary_expression): For omp atomic binary
963 expressions, use make_node instead of build2 to avoid checking build2
964 performs.
965
8e6198d0
GA
9662020-11-23 Joseph Myers <joseph@codesourcery.com>
967
968 PR c/95630
969 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
970 for comparisons of complete and incomplete pointers.
971
7a97e2fc
GA
9722020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
973
974 * c-aux-info.c (gen_type): Support opaque types.
975
82e5048e
GA
9762020-11-20 Martin Sebor <msebor@redhat.com>
977
978 PR middle-end/97879
979 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
980
9812020-11-20 Jakub Jelinek <jakub@redhat.com>
982
983 PR other/97911
984 * Make-lang.in (c.serial): Change from goal to a variable.
985 (.PHONY): Drop c.serial.
986
9872020-11-20 Martin Uecker <muecker@gwdg.de>
988
989 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
990
d62586ee
GA
9912020-11-19 Jakub Jelinek <jakub@redhat.com>
992
993 PR c/97860
994 * c-decl.c (get_parm_array_spec): Bail out of nelts is
995 error_operand_p.
996
25bb75f8
GA
9972020-11-18 Jakub Jelinek <jakub@redhat.com>
998
999 * Make-lang.in (c.serial): New goal.
1000 (.PHONY): Add c.serial c.prev.
1001 (cc1$(exeext)): Call LINK_PROGRESS.
1002
77f67db2
GA
10032020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1004
1005 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1006 goto too.
1007 * c-typeck.c (build_asm_expr): Remove an assert checking output
1008 absence for asm goto.
1009
10102020-11-13 Jakub Jelinek <jakub@redhat.com>
1011
1012 * c-typeck.c (c_finish_omp_clauses): Don't clear
1013 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1014
10152020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1016
1017 PR objc/77404
1018 * c-parser.c (c_parser_objc_class_definition): Pass the
1019 location of the class name to the interface declaration.
1020
bb622641
GA
10212020-11-10 Strager Neds <strager.nds@gmail.com>
1022
1023 * c-decl.c (merge_decls): Use new overload of
1024 set_decl_section_name.
1025
10262020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1027
1028 * c-parser.c (c_parser_omp_target_data): Add use of
1029 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1030 handled map clause kind.
1031 (c_parser_omp_target_enter_data): Likewise.
1032 (c_parser_omp_target_exit_data): Likewise.
1033 (c_parser_omp_target): Likewise.
1034 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1035 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1036 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1037 same struct field access to co-exist on OpenMP construct.
1038
2da7ee05
GA
10392020-11-07 Martin Uecker <muecker@gwdg.de>
1040
1041 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1042 (c_parser_all_labels): Likewise.
1043
44cab2d8
GA
10442020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1045
1046 * c-parser.c (c_parser_objc_at_property_declaration):
1047 Improve parsing fidelity. Associate better location info
1048 with @property attributes. Clean up the interface to
1049 objc_add_property_declaration ().
1050
10512020-11-06 Nathan Sidwell <nathan@acm.org>
1052
1053 * c-decl.c (diagnose_mismatched_decls): Rename
1054 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1055 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1056 (collect_source_refs): Likewise.
1057 * c-typeck.c (inform_declaration, inform_for_arg)
1058 (convert_for_assignment): Likewise.
1059
10602020-11-06 Tobias Burnus <tobias@codesourcery.com>
1061
1062 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1063 OpenACC matching.
1064 (c_parser_omp_construct): Update call.
1065
35c125cb
GA
10662020-11-04 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR c++/97670
1069 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1070 find underlying decl to clear in the aligned_head bitmap.
1071
10722020-11-04 Joseph Myers <joseph@codesourcery.com>
1073
1074 * c-decl.c (handle_nodiscard_attribute): New.
1075 (std_attribute_table): Add nodiscard.
1076 * c-parser.c (c_parser_std_attribute): Expect argument to
1077 nodiscard attribute to be a string. Do not special-case ignoring
1078 nodiscard.
1079 * c-typeck.c (maybe_warn_nodiscard): New.
1080 (build_compound_expr, emit_side_effect_warnings): Call
1081 maybe_warn_nodiscard.
1082 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1083 emit_side_effect_warnings if warn_unused_result.
1084
4f0606fe
GA
10852020-10-29 Asher Gordon <AsDaGo@posteo.net>
1086
1087 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1088 with XDELETE.
1089 (finish_init): Likewise.
1090 (pop_init_level): Likewise.
1091
e93aae4a
GA
10922020-10-28 Joseph Myers <joseph@codesourcery.com>
1093
1094 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1095 error_at for omitted parameter name.
1096
10972020-10-28 Jakub Jelinek <jakub@redhat.com>
1098
1099 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1100 (c_parser_omp_clause_allocate): New function.
1101 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1102 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1103 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1104 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1105 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1106 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1107 PRAGMA_OMP_CLAUSE_ALLOCATE.
1108 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1109
89bb01e7
GA
11102020-10-27 Joseph Myers <joseph@codesourcery.com>
1111
1112 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1113 standard attributes.
1114
efe71fcc
GA
11152020-10-23 Marek Polacek <polacek@redhat.com>
1116
1117 PR c++/91741
1118 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1119 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1120 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1121 * c-tree.h (char_type_p): Declare.
1122 * c-typeck.c (char_type_p): No longer static.
1123
11242020-10-23 Martin Sebor <msebor@redhat.com>
1125
1126 PR middle-end/97552
1127 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1128
2fe5b7d1
GA
11292020-09-19 Martin Sebor <msebor@redhat.com>
1130
1131 PR c/50584
1132 * c-decl.c (lookup_last_decl): Define new function.
1133 (c_decl_attributes): Call it.
1134 (start_decl): Add argument and use it.
1135 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1136 (get_parm_array_spec): Define new function.
1137 (push_parm_decl): Call get_parm_array_spec.
1138 (start_function): Call warn_parm_array_mismatch. Build attribute
1139 access and add it to current function.
1140 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1141 in forms of array parameters.
1142 * c-tree.h (start_decl): Add argument.
1143
11442020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1145
1146 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1147 with...
1148 (in_statement): New.
1149 (start_function): Adjust for above change.
1150 (c_push_function_context, c_pop_function_context): Likewise.
1151 * c-lang.h (struct language_function): Likewise.
1152 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1153 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1154 New.
1155 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1156 (c_parser_switch_statement): Adjust break/switch context handling
1157 and calls to renamed functions.
1158 (c_parser_while_statement): Adjust break/switch context handling and
1159 build a WHILE_STMT.
1160 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1161 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1162 (c_parser_omp_for_loop): Adjust break/switch context handling.
1163 * c-tree.h (c_break_label, c_cont_label): Delete.
1164 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1165 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1166 (in_statement, switch_statement_break_seen_p): Declare.
1167 (c_start_case, c_finish_case): Renamed to...
1168 (c_start_switch, c_finish_switch).
1169 (c_finish_bc_stmt): Adjust arguments.
1170 * c-typeck.c (build_function_call_vec): Don't try to print
1171 statements with %qE format.
1172 (struct c_switch): Rename switch_expr field to switch_stmt.
1173 Add break_stmt_seen_p field.
1174 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1175 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1176 (do_case): Update for changes to struct c_switch.
1177 (c_finish_case): Rename to c_finish_switch. Update for changes to
1178 struct c_switch and change of representation from SWITCH_EXPR to
1179 SWITCH_STMT.
1180 (c_finish_loop): Delete.
1181 (c_finish_bc_stmt): Update to reflect changes to break/continue
1182 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1183 of a GOTO_EXPR except for objc foreach loops.
1184
e1a4a8a0
GA
11852020-09-01 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR c++/96867
1188 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1189 only on PARM_DECLs.
1190
8f7ea26a
GA
11912020-08-28 Martin Sebor <msebor@redhat.com>
1192
1193 PR c/96596
1194 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1195 argument type.
1196
8b394f01
GA
11972020-08-27 Martin Liska <mliska@suse.cz>
1198
1199 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1200 growth function to true.
1201
db0f6efe
GA
12022020-08-25 Tobias Burnus <tobias@codesourcery.com>
1203
1204 PR c/96678
1205 * c-typeck.c (handle_omp_array_sections_1): Talk about
1206 array function parameter in the error message.
1207
5c265693
GA
12082020-08-18 Jakub Jelinek <jakub@redhat.com>
1209
1210 PR c/96571
1211 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1212 to int, holding index of the match. Call mark_exp_read on the selector
1213 expression and on expressions other than the selected one.
1214
4967ca2f
GA
12152020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1216
1217 PR c/96377
1218 * c-typeck.c (process_init_element): Split test for whether to
1219 recurse into a record, union or array into...
1220 (initialize_elementwise_p): ...this new function. Don't recurse
1221 into a vector type if the initialization value is also a vector.
1222
48cc2e46
GA
12232020-07-31 Richard Biener <rguenther@suse.de>
1224
1225 PR debug/96383
1226 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1227 Define to c_common_finalize_early_debug.
1228
3ea9abca
GA
12292020-07-22 Tobias Burnus <tobias@codesourcery.com>
1230
1231 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1232 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1233 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1234
30430061
GA
12352020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1236
1237 PR target/95237
1238 * c-decl.c (finish_decl): Call target hook
1239 lower_local_decl_alignment to lower local decl alignment.
1240
3f8ca9cb
GA
12412020-07-09 Julian Brown <julian@codesourcery.com>
1242 Thomas Schwinge <thomas@codesourcery.com>
1243
1244 PR middle-end/95270
1245 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1246 for standalone attach/detach clauses.
1247
a82c4c4c 12482020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1249
1250 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1251 set, warn for conversion between pointers that point to incompatible
1252 scalar storage orders.
1253
f60ee68d
GA
12542020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1255
1256 * c-parser.c (c_parser_statement_after_labels): Pass correct
1257 parameters to c_parser_do_statement.
1258
56638b9b
GA
12592020-06-16 Jakub Jelinek <jakub@redhat.com>
1260
1261 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1262 c_in_omp_for.
1263 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1264 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1265 c_finish_omp_for.
1266 * c-tree.h (c_in_omp_for): Declare.
1267 * c-typeck.c (c_in_omp_for): Define.
1268 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1269 (digest_init): Likewise.
1270 (build_binary_op): Likewise.
1271
12722020-06-16 Jakub Jelinek <jakub@redhat.com>
1273
1274 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1275 from kind by comma rather than colon.
1276
1a59f3db
GA
12772020-06-05 Mark Wielaard <mark@klomp.org>
1278
1279 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1280 an undeclared builtin, then add a fixit header hint, if found.
1281 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1282 warning_at about implicit builtin declaration type mismatch.
1283
9a5b7438
GA
12842020-06-03 Mark Wielaard <mark@klomp.org>
1285
1286 * c-parser.c (struct c_parser): Add seen_string_literal
1287 bitfield.
1288 (c_parser_consume_token): Reset seen_string_literal.
1289 (c_parser_error_richloc): Add name_hint if seen_string_literal
1290 and next token is a CPP_NAME and we have a missing header
1291 suggestion for the name.
1292 (c_parser_string_literal): Set seen_string_literal.
1293
12942020-06-03 Mark Wielaard <mark@klomp.org>
1295
1296 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1297 scope with matching_parens after CPP_OPEN_PAREN.
1298
12992020-06-03 Tobias Burnus <tobias@codesourcery.com>
1300
1301 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1302
53ffb43a
GA
13032020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1304
1305 * Make-lang.in: Remove extra slash.
1306
8f66f175
ML
13072020-05-19 Martin Liska <mliska@suse.cz>
1308
1309 * c-parser.c: Fix typo.
1310
49ddde69
JJ
13112020-05-14 Jakub Jelinek <jakub@redhat.com>
1312
1313 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1314
eb72dc66
RB
13152020-05-07 Richard Biener <rguenther@suse.de>
1316
1317 PR middle-end/94703
1318 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1319 DECL_GIMPLE_REG_P.
1320
bf915591
JJ
13212020-04-30 Jakub Jelinek <jakub@redhat.com>
1322
1323 PR c/94842
1324 * c-decl.c (set_labels_context_r): In addition to context-less
1325 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1326 parent function if any.
1327 (store_parm_decls): Adjust comment.
1328
e1113ffb
JJ
13292020-04-19 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR objc/94637
1332 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1333 two CPP_COLON tokens.
1334
2e389749
JJ
13352020-04-17 Jakub Jelinek <jakub@redhat.com>
1336
1337 PR other/94629
1338 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1339 to data.clauses.
1340
2dc9294c
JJ
13412020-04-15 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR c/94593
1344 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1345 requires directive when not at file scope.
1346
13e41d8b
TB
13472020-04-08 Tobias Burnus <tobias@codesourcery.com>
1348
1349 PR middle-end/94120
1350 * c-decl.c (c_check_in_current_scope): New function.
1351 * c-tree.h (c_check_in_current_scope): Declare it.
1352 * c-parser.c (c_parser_oacc_declare): Add check that variables
1353 are declared in the same scope as the directive. Fix handling
1354 of namespace vars.
1355
4df50a05
JJ
13562020-04-07 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR c++/94512
1359 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1360 if c_parser_omp_master succeeded.
1361
5db9e893
JJ
13622020-03-23 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR gcov-profile/94029
1365 PR c/94239
1366 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1367 the function_start_locus location. Don't do that afterwards for the
1368 __GIMPLE body parsing.
1369
9def91e9
JJ
13702020-03-19 Jakub Jelinek <jakub@redhat.com>
1371
1372 PR gcov-profile/94029
1373 * c-tree.h (finish_function): Add location_t argument defaulted to
1374 input_location.
1375 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1376 set it to the locus of closing } if non-NULL.
1377 (c_parser_compound_statement_nostart): Return locus of closing }.
1378 (c_parser_parse_rtl_body): Likewise.
1379 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1380 finish_function.
1381 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1382 input_location to set function_end_locus.
1383
046c5890
JJ
13842020-03-17 Jakub Jelinek <jakub@redhat.com>
1385
1386 PR c/94172
1387 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1388 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1389 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1390 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1391 ENUMERAL_TYPEs.
1392 (finish_incomplete_vars): New function, moved from finish_struct. Use
1393 relayout_decl instead of layout_decl.
1394 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1395 being TYPE_VFIELD. Use finish_incomplete_vars.
1396 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1397 finish_incomplete_vars.
1398 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1399 also on ENUMERAL_TYPEs.
1400
c015ff8c
JJ
14012020-03-16 Jakub Jelinek <jakub@redhat.com>
1402
1403 PR c/94179
1404 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1405
f2e9fe5f
MS
14062020-03-13 Martin Sebor <msebor@redhat.com>
1407
1408 PR c/94040
1409 * c-decl.c (builtin_structptr_type_count): New constant.
1410 (match_builtin_function_types): Reject decls that are incompatible
1411 in types pointed to by pointers.
1412 (diagnose_mismatched_decls): Adjust comments.
1413
c9d70946
JM
14142020-03-05 Joseph Myers <joseph@codesourcery.com>
1415
1416 PR c/93577
1417 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1418 empty when initialized type is error_mark_node.
1419 (set_designator, process_init_element): Ignore initializers for
1420 elements of a variable-size type or of error_mark_node.
1421
726e292d
MS
14222020-03-01 Martin Sebor <msebor@redhat.com>
1423
1424 PR middle-end/93926
1425 * c-decl.c (types_close_enough_to_match): New function.
1426 (match_builtin_function_types):
1427 (diagnose_mismatched_decls): Add missing inform call to a warning.
1428
a499c2f8
MS
14292020-03-01 Martin Sebor <msebor@redhat.com>
1430
1431 PR c/93812
1432 * c-typeck.c (build_functype_attribute_variant): New function.
1433 (composite_type): Call it.
1434
9c3da8cc
JJ
14352020-02-25 Jakub Jelinek <jakub@redhat.com>
1436
1437 PR other/93912
1438 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1439 Rename last argument from probablity to probability.
1440
bacdd5e9
JJ
14412020-02-13 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR c/93576
1444 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1445 *expr if it has side effects.
1446
f9eb0973
JL
14472020-01-30 Jeff Law <law@redhat.com>
1448
1449 PR c/88660
1450 * c-parser.c (c_parser_switch_statement): Make sure to request
1451 marking the switch expr as used.
1452
ac68e287
JM
14532020-01-22 Joseph Myers <joseph@codesourcery.com>
1454
1455 PR c/93348
1456 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1457 argument with integer operands.
1458
852f0ae8
KK
14592020-01-16 Kerem Kat <keremkat@gmail.com>
1460
1461 PR c/92833
1462 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1463 to support 4 available tokens.
1464
e2346a33
JM
14652020-01-15 Joseph Myers <joseph@codesourcery.com>
1466
1467 PR c/93072
1468 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1469 determine whether to set DECL_CONTEXT.
1470
3d77686d
JM
14712020-01-13 Joseph Myers <joseph@codesourcery.com>
1472
1473 PR c/93241
1474 * c-typeck.c (build_c_cast): Check for expressions with integer
1475 operands that can occur in an unevaluated part of an integer
1476 constant expression and call note_integer_operands as needed.
1477
f74c4b2c
RB
14782019-01-08 Richard Biener <rguenther@suse.de>
1479
1480 PR middle-end/93199
1481 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1482 permanently.
1483
8d9254fc
JJ
14842020-01-01 Jakub Jelinek <jakub@redhat.com>
1485
1486 Update copyright years.
1487
39292e25
EB
14882019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1489
1490 * c-decl.c (collect_source_ref_cb): Delete.
1491 (for_each_global_decl): Rename into...
1492 (collect_source_refs): ...this. Call collect_source_ref directly.
1493 (c_parse_final_cleanups): Always call collect_source_ref on the main
1494 input filename.
1495
519d7496
JB
14962019-12-19 Julian Brown <julian@codesourcery.com>
1497 Cesar Philippidis <cesar@codesourcery.com>
1498
1499 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1500 detach clauses.
1501 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1502 Allow deref (->) in variable lists if true.
1503 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1504 Pass to c_parser_omp_variable_list.
1505 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1506 call to c_parser_omp_variable_list.
1507 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1508 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1509 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1510 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1511 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1512 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1513 and detach. Support deref.
1514 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1515 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1516 (c_oacc_check_attachments): New function.
1517 (c_finish_omp_clauses): Check attach/detach arguments for being
1518 pointers using above. Support deref.
1519
a6163563
JB
15202019-12-19 Julian Brown <julian@codesourcery.com>
1521 Maciej W. Rozycki <macro@codesourcery.com>
1522 Tobias Burnus <tobias@codesourcery.com>
1523 Thomas Schwinge <thomas@codesourcery.com>
1524
1525 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1526 (c_parser_oacc_data_clause): Likewise.
1527 (c_parser_oacc_all_clauses): Likewise.
1528 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1529 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1530 PRAGMA_OACC_CLAUSE_NO_CREATE.
1531 * c-typeck.c (handle_omp_array_sections): Support
1532 GOMP_MAP_NO_ALLOC.
1533
d68f5d45
DM
15342019-12-09 David Malcolm <dmalcolm@redhat.com>
1535
1536 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1537 Replace label_text ctor calls.
1538
4691bf46
JM
15392019-12-04 Joseph Myers <joseph@codesourcery.com>
1540
1541 PR c/36941
1542 PR c/88827
1543 * c-typeck.c (convert_lvalue_to_rvalue): Call
1544 require_complete_type for arguments not of void types.
1545 (build_indirect_ref): Do not diagnose dereferencing pointers to
1546 incomplete types.
1547 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1548
85d11957
JM
15492019-12-03 Joseph Myers <joseph@codesourcery.com>
1550
1551 PR c/88704
1552 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1553 old-style parameter definitions.
1554
4569f8b3
SL
15552019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1556
1557 PR target/92499
1558
1559 * c-decl.c (flexible_array_type_p): Move to common code.
1560
65ef05d0
RS
15612019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1562
1563 * c-decl.c (start_decl): Allow initialization of variables whose
1564 size is a POLY_INT_CST.
1565 (finish_decl): Use verify_type_context to check whether the target
1566 allows variables with a particular type to have static or thread-local
1567 storage duration. Don't raise a second error if such variables do
1568 not have a constant size.
1569 (grokdeclarator): Use verify_type_context to check whether the
1570 target allows fields or array elements to have a particular type.
1571 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1572 the target allows pointer difference for the types involved.
1573 (build_unary_op): Likewise for pointer increment and decrement.
1574
34b43828
JM
15752019-11-29 Joseph Myers <joseph@codesourcery.com>
1576
1577 * c-parser.c (struct c_parser): Add members raw_tokens and
1578 raw_tokens_used.
1579 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1580 using previously-lexed raw tokens.
1581 (c_parser_peek_nth_token_raw)
1582 (c_parser_check_balanced_raw_token_sequence): New functions.
1583 (c_parser_nth_token_starts_std_attributes): Use
1584 c_parser_check_balanced_raw_token_sequence for Objective-C.
1585
5b8d9367
JM
15862019-11-25 Joseph Myers <joseph@codesourcery.com>
1587
1588 PR c/91985
1589 * c-decl.c (finish_declspecs): Use int instead of decimal
1590 floating-point types if decimal floating-point not supported.
1591
1723e1be
JM
15922019-11-25 Joseph Myers <joseph@codesourcery.com>
1593
1594 * c-tree.h (struct c_declarator): Use a structure for id member.
1595 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1596 declarators at the start, not when handling individual declarators
1597 later. Use u.id.id instead of u.id.
1598 (grokfield): Use u.id.id instead of u.id.
1599 (build_id_declarator): Set u.id.id and u.id.attrs.
1600 (finish_declspecs): Handle postfix attributes in case of typedef
1601 name or typeof used.
1602 * c-parser.c (c_parser_direct_declarator)
1603 (c_parser_direct_declarator_inner): Place declarator for
1604 attributes inside that for function or array, not outside. Set
1605 u.id.attrs for identifiers.
1606 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1607 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1608 instead of u.id.
1609
bdaf8be1
JJ
16102019-11-22 Jakub Jelinek <jakub@redhat.com>
1611
1612 PR c/90677
1613 * c-decl.c (identifier_global_tag): Define.
1614
3e00ba47
RB
16152019-11-20 Richard Biener <rguenther@suse.de>
1616
1617 PR c/92088
1618 * c-decl.c (grokdeclarator): Prevent inlining of nested
1619 function with VLA arguments.
1620
8c5b727a
JM
16212019-11-20 Joseph Myers <joseph@codesourcery.com>
1622
1623 * c-decl.c (c_warn_type_attributes): New function.
1624 (groktypename, grokdeclarator, finish_declspecs): Call
1625 c_warn_type_attributes before applying attributes to types.
1626 * c-tree.h (c_warn_type_attributes): Declare.
1627
192961ff
JM
16282019-11-19 Joseph Myers <joseph@codesourcery.com>
1629
1630 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1631 standard attributes.
1632 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1633 pedwarn for unknown standard attributes and return error_mark_node
1634 for them.
1635
20a38017
MM
16362019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1637
1638 * c-parser.c (c_parser_parse_rtl_body): Always call
1639 run_rtl_passes, even if startwith pass is not provided.
1640
d5fbe5e0
JM
16412019-11-15 Joseph Myers <joseph@codesourcery.com>
1642
1643 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1644 duplicate standard attributes.
1645
97cc1187
JM
16462019-11-15 Joseph Myers <joseph@codesourcery.com>
1647
1648 * c-decl.c (std_attribute_table): Add maybe_unused.
1649
f8aea5e3
JM
16502019-11-15 Joseph Myers <joseph@codesourcery.com>
1651
1652 * c-decl.c (std_attribute_table): Add fallthrough.
1653 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1654 attribute at top level.
1655
2cc94aa8
JM
16562019-11-15 Joseph Myers <joseph@codesourcery.com>
1657
1658 * c-decl.c (std_attribute_table): New.
1659 (c_init_decl_processing): Register attributes from
1660 std_attribute_table.
1661 * c-parser.c (c_parser_attribute_arguments): Add arguments
1662 require_string and allow_empty_args. All callers changed.
1663 (c_parser_std_attribute): Set require_string argument for
1664 "deprecated" attribute.
1665
7c5890cc
JM
16662019-11-14 Joseph Myers <joseph@codesourcery.com>
1667
1668 * c-parser.c (c_parser_postfix_expression)
1669 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1670 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1671
e8738f4e
RS
16722019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1673
1674 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1675 of build_same_sized_truth_vector_type.
1676 (build_vec_cmp): Likewise.
1677
b2417b59
JJ
16782019-11-14 Jakub Jelinek <jakub@redhat.com>
1679
bedb7f04
JJ
1680 * c-parser.c (c_parser_omp_context_selector): Don't require score
1681 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1682 negative score.
1683
b2417b59
JJ
1684 * c-parser.c (c_parser_omp_context_selector): Rename
1685 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1686 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1687 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1688 and string literals.
1689
4e03c3a7
JM
16902019-11-14 Joseph Myers <joseph@codesourcery.com>
1691
1692 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1693 ctsk_tagfirstref_attrs.
1694 (struct c_declspecs): Update description of attrs. Add
1695 postfix_attrs and non_std_attrs_seen_p. Increase size of
1696 typespec_kind bit-field.
1697 (c_warn_unused_attributes): New declaration.
1698 (parser_xref_tag): Update prototype.
1699 * c-decl.c (c_warn_unused_attributes): New function.
1700 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1701 ctsk_tagref_attrs. Handle attribute declarations.
1702 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1703 (grokdeclarator): Handle standard attributes.
1704 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1705 attributes to incomplete type reference.
1706 (xref_tag): Update call to parser_xref_tag.
1707 (declspecs_add_addrspace, declspecs_add_type)
1708 (declspecs_add_scspec, declspecs_add_attrs): Set
1709 non_std_attrs_seen_p.
1710 (finish_declspecs): Apply postfix standard attributes to type.
1711 * c-parser.c (c_token_starts_declspecs)
1712 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1713 (c_parser_next_tokens_start_declaration): Update comments.
1714 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1715 parser->tokens[2] to parser->tokens[1].
1716 (c_parser_nth_token_starts_std_attributes)
1717 (c_parser_std_attribute_specifier_sequence): New functions.
1718 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1719 attrs. All callers changed. Handle standard attributes.
1720 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1721 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1722 All callers changed.
1723 (c_parser_declspecs): Add arguments start_std_attr_ok and
1724 end_std_attr_ok. All callers changed. Handle standard
1725 attributes.
1726 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1727 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1728 (c_parser_compound_statement_nostart, c_parser_all_labels)
1729 (c_parser_label, c_parser_statement, c_parser_for_statement):
1730 Handle standard attributes.
1731 * c-parser.h (c_parser_declspecs): Update prototype.
1732 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1733 c_parser_declspecs.
1734
0c29cac4
ML
17352019-11-12 Martin Liska <mliska@suse.cz>
1736
1737 * gimple-parser.c: Do not include params.h.
1738
028d4092
ML
17392019-11-12 Martin Liska <mliska@suse.cz>
1740
1741 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1742 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1743 macro.
1744
62aee289
MR
17452019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1746 Frederik Harwath <frederik@codesourcery.com>
1747
1748 gcc/c/
1749 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1750 (c_parser_oacc_kernels_parallel): Rename function to...
1751 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1752 (c_parser_omp_construct): Update accordingly.
1753
1754
7cec9588
JJ
17552019-11-11 Jakub Jelinek <jakub@redhat.com>
1756
1757 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1758 without corresponding end declare target.
1759
f486280c
RS
17602019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1761
1762 * c-convert.c (convert): Only handle vector conversions if one of
1763 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1764 allows it.
1765 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1766 vectors satisfy gnu_vector_type_p.
1767 (build_unary_op): Only allow unary operators to be applied to
1768 vectors if they satisfy gnu_vector_type_p.
1769 (digest_init): Only allow by-element initialization of vectors
1770 if they satisfy gnu_vector_type_p.
1771 (really_start_incremental_init): Likewise.
1772 (push_init_level): Likewise.
1773 (pop_init_level): Likewise.
1774 (process_init_element): Likewise.
1775 (build_binary_op): Only allow binary operators to be applied to
1776 vectors if they satisfy gnu_vector_type_p.
1777
017c6491
JM
17782019-11-08 Joseph Myers <joseph@codesourcery.com>
1779
1780 * c-decl.c (grokparms): Convert () in a function definition to
1781 (void) for C2x.
1782 (store_parm_decls_oldstyle): Pedwarn for C2x.
1783 (store_parm_decls): Update comment about () not generating a
1784 prototype.
1785
c01bd174
JM
17862019-11-07 Joseph Myers <joseph@codesourcery.com>
1787
1788 * c-parser.c (c_parser_attribute_arguments): New function.
1789 Factored out of c_parser_gnu_attribute.
1790 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1791 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1792 (c_parser_std_attribute_specifier): New functions.
1793 (c_parser_transaction_attributes): Use
1794 c_parser_std_attribute_specifier.
1795
471c5330
JM
17962019-11-07 Joseph Myers <joseph@codesourcery.com>
1797
1798 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1799 lex_joined_string and translate_strings_p.
1800 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1801 c_lex_with_flags.
1802 (c_parser_string_literal): New function.
1803 (c_parser_static_assert_declaration_no_semi): Use
1804 c_parser_string_literal. Do not set lex_untranslated_string.
1805 (c_parser_asm_string_literal): Use c_parser_string_literal.
1806 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1807 (c_parser_gnu_attributes): Set and restore translate_strings_p
1808 instead of lex_untranslated_string.
1809 (c_parser_asm_statement): Do not set lex_untranslated_string.
1810 (c_parser_asm_operands): Likewise.
1811 (c_parser_has_attribute_expression): Set and restore
1812 translate_strings_p instead of lex_untranslated_string.
1813 (c_parser_postfix_expression): Use c_parser_string_literal.
1814 (pragma_lex): Likewise.
1815 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1816 (c_parse_file): Set translate_strings_p.
1817 * gimple-parser.c (c_parser_gimple_postfix_expression)
1818 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1819 * c-parser.c (c_parser_string_literal): Declare function.
1820
d0c464d2
JJ
18212019-11-02 Jakub Jelinek <jakub@redhat.com>
1822
1823 * c-parser.c (c_finish_omp_declare_variant): Use
1824 omp_get_context_selector instead of c_omp_get_context_selector.
1825
ac2cfa6c
RS
18262019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1827
1828 * c-tree.h (c_simulate_enum_decl): Declare.
1829 * c-decl.c (c_simulate_enum_decl): New function.
1830 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1831
74078538
RS
18322019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1833
1834 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1835 * c-decl.c (c_simulate_builtin_function_decl): New function.
1836 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1837 to the above.
1838
ad1539d5
MS
18392019-10-28 Martin Sebor <msebor@redhat.com>
1840
1841 PR c/66970
1842 * c-decl.c (names_builtin_p): Define a new function.
1843
cb73e4e7
RB
18442019-10-28 Richard Biener <rguenther@suse.de>
1845
1846 PR c/92249
1847 * gimple-parser.c (c_parser_parse_gimple_body): Make
1848 current_bb the entry block initially to easier recover
1849 from errors.
1850 (c_parser_gimple_compound_statement): Adjust.
1851
135df52c
JJ
18522019-10-24 Jakub Jelinek <jakub@redhat.com>
1853
1854 * c-parser.c (c_finish_omp_declare_variant): Use
1855 omp_context_selector_matches instead of
1856 c_omp_context_selector_matches.
1857 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1858 attribute in between declare target and end declare target
1859 pragmas.
1860
783bfe5e
JM
18612019-10-15 Joseph Myers <joseph@codesourcery.com>
1862
1863 * c-parser.c (c_parser_attribute_any_word): Rename to
1864 c_parser_gnu_attribute_any_word. All callers changed.
1865 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1866 callers changed.
1867 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1868 callers changed.
1869 (c_parser_declaration_or_fndef, c_parser_declspecs)
1870 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1871 (c_parser_struct_declaration, c_parser_declarator)
1872 (c_parser_gnu_attribute, c_parser_compound_statement)
1873 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1874 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1875 attribute-related syntax productions.
1876
56898e43
RS
18772019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1878
1879 * c-objc-common.c (useful_aka_type_p): Replace with...
1880 (get_aka_type): ...this new function. Given the original type,
1881 decide which aka type to print (if any). Only look through typedefs
1882 if user_facing_original_type_p.
1883 (print_type): Update accordingly.
1884
b9424661
JJ
18852019-10-14 Jakub Jelinek <jakub@redhat.com>
1886
1887 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1888 into int NESTED, if it is 2, diagnose missing commas in between
1889 clauses.
1890 (c_parser_omp_context_selector): Pass 2 as last argument to
1891 c_parser_omp_all_clauses.
1892
20de9568
JJ
18932019-10-12 Jakub Jelinek <jakub@redhat.com>
1894
1895 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1896 For simd properties, put them directly into TREE_VALUE.
1897 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1898 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1899 add "omp declare variant base" attribute rather than
1900 "omp declare variant".
1901
fe2bc27c
JM
19022019-10-11 Joseph Myers <joseph@codesourcery.com>
1903
1904 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1905
94e7f906
JJ
19062019-10-10 Jakub Jelinek <jakub@redhat.com>
1907
1908 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1909 true, terminate processing on closing paren and don't skip to end of
1910 pragma line.
1911 (c_parser_omp_declare_simd): Handle also declare variant.
1912 (omp_construct_selectors, omp_device_selectors,
1913 omp_implementation_selectors, omp_user_selectors): New variables.
1914 (c_parser_omp_context_selector,
1915 c_parser_omp_context_selector_specification,
1916 c_finish_omp_declare_variant): New functions.
1917 (c_finish_omp_declare_simd): Handle both declare simd and
1918 declare variant.
1919 (c_parser_omp_declare): Handle declare variant.
1920
93313b94
JM
19212019-10-02 Joseph Myers <joseph@codesourcery.com>
1922
1923 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1924 CPP_COLON tokens.
1925
55879815
RS
19262019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1927
1928 * c-objc-common.c (useful_aka_type_p): New function.
1929 (print_type): Use it to decide whether an aka type is worth printing.
1930
59bc434a
JJ
19312019-09-27 Jakub Jelinek <jakub@redhat.com>
1932
1933 PR c++/88203
1934 * c-parser.c (c_parser_predefined_identifier): New function.
1935 (c_parser_postfix_expression): Use it.
1936 (c_parser_omp_variable_list): Parse predefined identifiers.
1937 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1938 in shared and firstprivate clauses, even when they are predetermined
1939 shared.
1940
c6447c20
RS
19412019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1942
1943 * c-typeck.c (build_function_call_vec): Take the original function
1944 decl as an optional final parameter. Pass all built-in calls to
1945 check_builtin_function_arguments.
1946
522da4c2
EB
19472019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1948
1949 PR c/91815
1950 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1951 of identifiers in the external scope only for variables and functions.
1952
68e2c199
PK
19532019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1954
1955 PR c/78736
1956 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1957
22f8849d
IS
19582019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1959
1960 PR pch/61250
1961 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1962 after determining that the first token is not
1963 PRAGMA_GCC_PCH_PREPROCESS.
1964
db376f45
EB
19652019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1966
1967 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1968 FUNCTION_DECL to the right value in the presence of nested declarators.
1969
4d732405
RS
19702019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1971
1972 PR middle-end/91421
1973 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1974
cb1180d5
RS
19752019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1976
1977 PR middle-end/91421
1978 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1979 of a built_in_function.
1980 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1981
77eb117f
JJ
19822019-08-10 Jakub Jelinek <jakub@redhat.com>
1983
1984 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1985 (c_parser_omp_clause_device_type): New function.
1986 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1987 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1988 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1989 diagnostics for declare target with clauses nested in clause-less
1990 declare target declaration-definition-seq.
1991 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1992
2c3b8bad
JJ
19932019-08-09 Jakub Jelinek <jakub@redhat.com>
1994
bb522e2e
JJ
1995 * c-parser.c (check_no_duplicate_clause): Simplify using
1996 omp_find_clause.
1997 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1998 directive name modifiers.
1999 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2000
2c3b8bad
JJ
2001 PR c/91401
2002 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2003 check_no_duplicate_clause call. Comment it out, instead emit a
2004 warning for duplicate dist_schedule clauses.
2005
99769e7f
RS
20062019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2007
2008 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2009
8860d270
JJ
20102019-08-08 Jakub Jelinek <jakub@redhat.com>
2011
2012 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2013 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2014 instead of generic_head to track duplicates.
2015
398e3feb
JJ
20162019-08-07 Jakub Jelinek <jakub@redhat.com>
2017
2018 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2019 (c_parser_omp_clause_use_device_addr): New function.
2020 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2021 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2022 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2023 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2024 map or use_device_* clauses.
2025 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2026 in OpenMP, require pointer type rather than pointer or array type.
2027 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2028
a28351e7
JJ
20292019-07-31 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/91192
2032 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2033 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2034 case.
2035
6343b6bf
ML
20362019-07-25 Martin Liska <mliska@suse.cz>
2037 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2038
2039 PR c++/23383
2040 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2041
cb50701e
ML
20422019-07-25 Martin Liska <mliska@suse.cz>
2043
2044 * c-decl.c (merge_decls): Use new macros
2045 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2046
62e3e66f
RB
20472019-07-23 Richard Biener <rguenther@suse.de>
2048
2049 PR tree-optimization/83518
2050 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2051 a CFG also rebuild cgraph edges.
2052
554a530f
JJ
20532019-07-20 Jakub Jelinek <jakub@redhat.com>
2054
2055 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2056 (c_parser_omp_clause_bind): New function.
2057 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2058 (OMP_LOOP_CLAUSE_MASK): Define.
2059 (c_parser_omp_loop): New function.
2060 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2061 loop combined with parallel or teams.
2062 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2063 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2064
d119bf79
RS
20652019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2066
2067 PR c/53633
2068 * c-decl.c (finish_function): Check targetm.warn_func_return
2069 before issuing a -Wreturn-type warning.
2070
ab20d992 20712019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2072
2073 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2074 (c_parser_compound_statement): Call it.
2075
1fdd6f04
JJ
20762019-07-12 Jakub Jelinek <jakub@redhat.com>
2077
2078 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2079 (c_parser_omp_clause_order): New function.
2080 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2081 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2082 PRAGMA_OMP_CLAUSE_ORDER.
2083 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2084
8389386c
RB
20852019-07-10 Richard Biener <rguenther@suse.de>
2086
2087 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2088 _Literal (int *) &x for address literals.
2089
99b1c316
MS
20902019-07-09 Martin Sebor <msebor@redhat.com>
2091
2092 PR c++/61339
2093 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2094 to class.
2095 (field_decl_cmp): Same.
2096 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2097 * c-tree.h: Same.
2098 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2099
6c1dae73
MS
21002019-07-09 Martin Sebor <msebor@redhat.com>
2101
2102 PR c++/61339
2103 * c-decl.c: Change class-key from class to struct and vice versa
2104 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2105 * gimple-parser.c: Same.
2106
69b5279e
RB
21072019-07-01 Richard Biener <rguenther@suse.de>
2108
2109 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2110 _Literal (char *) &"foo" for address literals pointing to
2111 STRING_CSTs.
2112
ab20d992
JJ
21132019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2114
2115 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2116 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2117 C incompatibility if alternate "__intN__" form is used.
2118
1e3d475e
MS
21192019-06-24 Martin Sebor <msebor@redhat.com>
2120
2121 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2122
bf38f7e9
JJ
21232019-06-10 Jakub Jelinek <jakub@redhat.com>
2124
2125 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2126 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2127 (c_parser_omp_scan_loop_body): New function.
2128 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2129 inscan reduction clauses.
2130 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2131 non-inscan reductions on the same construct, or inscan reductions with
2132 ordered or schedule clauses, or inscan array reductions.
2133
65985d78
MS
21342019-06-05 Martin Sebor <msebor@redhat.com>
2135
2136 PR c/90737
2137 * c-typeck.c (c_finish_return): Only consider functions returning
2138 pointers as candidates for -Wreturn-local-addr.
2139
0ecf545c
MS
21402019-06-05 Martin Sebor <msebor@redhat.com>
2141
2142 * c-decl.c (start_decl): Adjust quoting and hyphenation
2143 in diagnostics.
2144 (finish_decl): Same.
2145 (finish_enum): Same.
2146 (start_function): Same.
2147 (declspecs_add_type): Same.
2148 * c-parser.c (warn_for_abs): Same.
2149 * c-typeck.c (build_binary_op): Same.
2150
e03436e7
TS
21512019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2152
b48f44bf
TS
2153 PR c/89433
2154 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2155 marked with an OpenACC 'routine' directive.
2156
5bf04509
TS
2157 PR c/89433
2158 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2159 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2160
e03436e7
TS
2161 PR c/89433
2162 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2163 clauses from "omp declare target" attribute.
2164
a9c697b8
MS
21652019-05-16 Martin Sebor <msebor@redhat.com>
2166
ab20d992
JJ
2167 * c-decl.c (start_decl): Quote keywords, operators, and
2168 types in diagnostics.
2169 (finish_decl): Same.
2170 * c-parser.c (c_parser_asm_statement): Same.
2171 (c_parser_conditional_expression): Same.
2172 (c_parser_transaction_cancel): Same.
2173 * c-typeck.c (c_common_type): Same.
2174 (build_conditional_expr): Same.
2175 (digest_init): Same.
2176 (process_init_element): Same.
2177 (build_binary_op): Same.
a9c697b8 2178
c4499192
RB
21792019-05-17 Richard Biener <rguenther@suse.de>
2180
2181 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2182 (c_parser_gimple_unary_expression): Likewise.
2183 (c_parser_gimple_parentized_ternary_expression): New function.
2184
adfe6e4b
RB
21852019-05-16 Richard Biener <rguenther@suse.de>
2186
2187 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2188 (c_parser_gimple_unary_expression): Likewise.
2189
186dabf2
RB
21902019-05-15 Richard Biener <rguenther@suse.de>
2191
2192 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2193 __BIT_FIELD_REF.
2194
1158c5b4
RB
21952019-05-14 Richard Biener <rguenther@suse.de>
2196
2197 * gimple-parser.c (c_parser_gimple_statement): Remove
2198 questionable auto-promotion to VIEW_CONVERT_EXPR.
2199 (c_parser_gimple_typespec): Split out from __MEM parsing.
2200 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2201 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2202 as __VIEW_CONVERT with -gimple.
2203
fd4485aa
ML
22042019-05-09 Martin Liska <mliska@suse.cz>
2205
2206 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2207 __MAX.
2208 (c_parser_gimple_unary_expression): Parse also binary expression
2209 __MIN and __MAX.
2210 (c_parser_gimple_parentized_binary_expression): New function.
2211
d276406a
ML
22122019-05-09 Martin Liska <mliska@suse.cz>
2213
2214 * gimple-parser.c (struct gimple_parser): Add probability.
2215 for gimple_parser_edge.
2216 (gimple_parser::push_edge): Add new argument probability.
2217 (c_parser_gimple_parse_bb_spec): Parse also probability
2218 if present.
2219 (c_parser_parse_gimple_body): Set edge probability.
2220 (c_parser_gimple_compound_statement): Consume token
2221 before calling c_parser_gimple_goto_stmt.
2222 Parse BB counts.
2223 (c_parser_gimple_statement): Pass new argument.
2224 (c_parser_gimple_goto_stmt): Likewise.
2225 (c_parser_gimple_if_stmt): Likewise.
2226 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2227 * c-parser.c (c_parser_declaration_or_fndef): Pass
2228 hot_bb_threshold argument.
2229 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2230 field.
2231 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2232
f179b64e
JJ
22332019-04-26 Jakub Jelinek <jakub@redhat.com>
2234
2235 PR debug/90197
2236 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2237 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2238 (c_parser_do_statement): Likewise.
2239 (c_parser_for_statement): Likewise. Formatting fixes.
2240 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2241 emit DEBUG_BEGIN_STMTs if needed.
2242
e7178413
JJ
22432019-04-19 Jakub Jelinek <jakub@redhat.com>
2244
c280b7ee
JJ
2245 PR c/89888
2246 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2247 (c_start_case): Don't clear it.
2248 (do_case): Adjust c_add_case_label caller.
2249 (c_finish_case): Adjust c_do_switch_warnings caller.
2250
e7178413
JJ
2251 PR c++/90108
2252 * c-decl.c (merge_decls): If remove is main variant and
2253 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2254 variant that has newdecl as TYPE_NAME if any.
2255
60a2c645
JJ
22562019-04-12 Jakub Jelinek <jakub@redhat.com>
2257
2258 PR c/89933
2259 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2260 don't try to remove it from the variant list, but instead assert
2261 it has no variants.
2262
2a82beaa
RB
22632019-04-01 Richard Biener <rguenther@suse.de>
2264
2265 PR c/71598
2266 * c-tree.h (c_get_alias_set): Declare.
2267 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2268 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2269 as the underlying integer type.
2270
bec1da64
MS
22712019-03-19 Martin Sebor <msebor@redhat.com>
2272
2273 PR tree-optimization/89688
2274 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2275 kinds of initializers.
2276
855cd9b1
JJ
22772019-03-19 Jakub Jelinek <jakub@redhat.com>
2278
2279 PR c/89734
2280 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2281 return type even if quals_used is 0. Formatting fixes.
2282
baa09dc5
RB
22832019-03-14 Richard Biener <rguenther@suse.de>
2284
2285 * c-tree.h (enum c_declspec_il): New.
2286 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2287 enum bitfield.
2288 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2289 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2290 (c_parser_declspecs): Adjust.
2291 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2292 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2293 and bitmap.h.
2294 (struct gimple_parser): New.
2295 (gimple_parser::push_edge): New method.
2296 (c_parser_gimple_parse_bb_spec): New helper.
2297 (c_parser_parse_gimple_body): Get start pass and IL specification.
2298 Initialize SSA and CFG.
2299 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2300 Build a gimple_parser parsing state and pass it along.
2301 (c_parser_gimple_statement): Change intermittend __PHI internal
2302 function argument for the edge.
2303 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2304 (c_parser_gimple_goto_stmt): Record edges to build.
2305 (c_parser_gimple_if_stmt): Likewise.
2306 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2307 (c_parser_gimple_or_rtl_pass_list): Likewise.
2308
a3f9f006
ML
23092019-03-11 Martin Liska <mliska@suse.cz>
2310
2311 * c-decl.c (check_for_loop_decls): Wrap an option name
2312 in a string format message and fix GNU coding style.
2313 * c-parser.c (c_parser_declspecs): Likewise.
2314
1db01ff9
JJ
23152019-03-08 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR tree-optimization/89550
2318 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2319 returned true.
2320 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2321 or warning returned true.
2322
66dcb747
JJ
23232019-02-28 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR c/89525
2326 * c-typeck.c (convert_arguments): Call inform_declaration only if
2327 the previous warning_at call returned true.
2328
2263c9f2
TS
23292019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2330
2331 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2332 parameter. Adjust all users.
2333 (c_parser_oacc_simple_clause): Replace parser with loc formal
2334 parameter. Adjust all users.
2335
ab20d992 23362019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2337
2338 PR c/87924
2339 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2340 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2341
5f88ba10
JJ
23422019-02-15 Jakub Jelinek <jakub@redhat.com>
2343
2344 PR c/89340
2345 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2346 before c_decl_attributes rather than after it.
2347
cfc30fd1
JJ
23482019-02-06 Jakub Jelinek <jakub@redhat.com>
2349
2350 PR c/89211
2351 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2352 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2353 instead of 3 nested ifs.
2354
fbe83e6b
JM
23552019-02-06 Joseph Myers <joseph@codesourcery.com>
2356
2357 PR c/88584
2358 * c-decl.c (finish_decl): Do not complete array types for arrays
2359 with external linkage not at file scope.
2360
f461f938
RB
23612019-02-05 Richard Biener <rguenther@suse.de>
2362
2363 PR c/88606
2364 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2365 all type variants when not supported.
2366
fe509359
JJ
23672019-01-30 Jakub Jelinek <jakub@redhat.com>
2368
2369 PR c/89061
2370 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2371 * c-decl.c (decl_jump_unsafe): Return false for
2372 C_DECL_COMPOUND_LITERAL_P decls.
2373 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2374
6a335b96
JJ
23752019-01-29 Jakub Jelinek <jakub@redhat.com>
2376
f4b7e754
JJ
2377 PR c/89045
2378 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2379 scope.
2380
6a335b96
JJ
2381 PR c/86125
2382 * c-decl.c (last_fileptr_type): Remove.
2383 (last_structptr_types): New variable.
2384 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2385 {old,new}rettype instead of the types themselves. Assert
2386 last_structptr_types array has the same number of elements
2387 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2388 argument oldtype and newtype. Instead of handling
2389 just fileptr_type_node specially, handle all builtin_structptr_types
2390 pointer nodes. Formatting fix.
2391
d8b5a1a0
MS
23922019-01-24 Martin Sebor <msebor@redhat.com>
2393
2394 PR c/86125
2395 PR c/88886
2396 PR middle-end/86308
2397 * c-decl.c (match_builtin_function_types): Add arguments.
2398 (diagnose_mismatched_decls): Diagnose mismatched declarations
2399 of built-ins more strictly.
2400
e21c4491
JJ
24012019-01-24 Jakub Jelinek <jakub@redhat.com>
2402
2403 PR c++/88976
2404 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2405 on #pragma omp cancel with different modifiers.
2406
420183d9
L
24072019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2408
2409 PR c/51628
2410 PR c/88664
2411 * c-typeck.c (convert_for_assignment): Upate the
2412 warn_for_address_or_pointer_of_packed_member call.
2413
17ad43dd
TH
24142019-01-16 Tom Honermann <tom@honermann.net>
2415 Jason Merrill <jason@redhat.com>
2416
2417 * c-typeck.c (digest_init): Revised the error message produced for
2418 ill-formed cases of array initialization with a string literal.
2419 (error_init): Make variadic.
2420
5f07d78a
JJ
24212019-01-12 Jakub Jelinek <jakub@redhat.com>
2422
2423 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2424
c4581bbf
JJ
24252019-01-07 Jakub Jelinek <jakub@redhat.com>
2426
2427 PR c/88701
2428 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2429 if current_function_decl is non-NULL.
2430
65c5b1eb
JM
24312019-01-07 Joseph Myers <joseph@codesourcery.com>
2432
2433 PR c/88720
2434 PR c/88726
2435 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2436 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2437 functions declared but never defined only for external scope, not
2438 for other scopes.
2439
d8fcab68
JJ
24402019-01-07 Jakub Jelinek <jakub@redhat.com>
2441
2442 PR c++/85052
2443 * c-parser.c (c_parser_postfix_expression): Parse
2444 __builtin_convertvector.
2445
a5544970
JJ
24462019-01-01 Jakub Jelinek <jakub@redhat.com>
2447
2448 Update copyright years.
2449
da77eace
L
24502018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2451
2452 PR c/51628
2453 * c-typeck.c (convert_for_assignment): Call
2454 warn_for_address_or_pointer_of_packed_member.
2455
1edf8866
SB
24562018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2457
2458 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2459 a more specific error message (instead of just falling through).
2460
db4fd626
SB
24612018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2462
2463 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2464 asm qualifier is first seen; use that to give nicer "duplicate asm
2465 qualifier" messages. Delete 'quals" variable, instead pass the
2466 "is_volatile_ flag to build_asm_stmt directly.
2467 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2468 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2469
9c9cfcbb
SB
24702018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2471
2472 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2473 "done" boolean variable.
2474
a14feb3c
DM
24752018-12-19 David Malcolm <dmalcolm@redhat.com>
2476
2477 PR c++/87504
2478 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2479 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2480 (build_binary_op): Use struct op_location_t and
2481 class binary_op_rich_location.
2482
6d939173
JJ
24832018-12-11 Jakub Jelinek <jakub@redhat.com>
2484
2485 PR sanitizer/88426
2486 * c-convert.c (convert): Call c_fully_fold before calling
2487 ubsan_instrument_float_cast.
2488
b7055028
SB
24892018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2490
2491 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2492 setting "quals".
2493
5b76e75f
SB
24942018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2495
2496 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2497 after asm. Pass a flag for it to build_asm_expr.
2498 * c-tree.h (build_asm_expr): Update declaration.
2499 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2500 set ASM_INLINE_P.
2501
30bd42b9
SB
25022018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2503
2504 PR inline-asm/55681
2505 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2506 combination of volatile and goto, in any order, without repetitions.
2507
9df6c0e4
JB
25082018-12-04 James Norris <jnorris@codesourcery.com>
2509 Cesar Philippidis <cesar@codesourcery.com>
2510 Julian Brown <julian@codesourcery.com>
2511
2512 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2513 code.
2514
f44697b7
RB
25152018-11-30 Richard Biener <rguenther@suse.de>
2516
2517 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2518 _Literal (type) { ... } as empty aggregate or vector constructor.
2519
550dfbdc
MS
25202018-11-29 Martin Sebor <msebor@redhat.com>
2521
2522 PR c/88091
2523 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2524 (convert_arguments): Add comments. Pass additional argument to
2525 the function above.
2526
673670da
MS
25272018-11-29 Martin Sebor <msebor@redhat.com>
2528
2529 PR c/88172
2530 PR testsuite/88208
2531 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2532
db1d09b0
MS
25332018-11-23 Martin Sebor <msebor@redhat.com>
2534
2535 PR testsuite/88098
2536 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2537 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2538
98f08eb8
MS
25392018-11-20 Martin Sebor <msebor@redhat.com>
2540
2541 * c-parser.c (c_parser_has_attribute_expression): New function.
2542 (c_parser_attribute): New function.
2543 (c_parser_attributes): Move code into c_parser_attribute.
2544 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2545
cd5da983
MS
25462018-11-15 Martin Sebor <msebor@redhat.com>
2547
2548 PR c/83656
2549 * c-decl.c (header_for_builtin_fn): Declare.
2550 (diagnose_mismatched_decls): Diagnose declarations of built-in
2551 functions without a prototype.
2552 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2553 (convert_argument): Same.
2554 (convert_arguments): Factor code out into convert_argument.
2555 Detect mismatches between built-in formal arguments in calls
2556 to built-in without prototype.
2557 (build_conditional_expr): Same.
2558 (type_or_builtin_type): New function.
2559 (convert_for_assignment): Add argument. Conditionally issue
2560 warnings instead of errors for mismatches.
2561
620e594b
DM
25622018-11-13 David Malcolm <dmalcolm@redhat.com>
2563
2564 * c-decl.c: Replace "source_location" with "location_t".
2565 * c-tree.h: Likewise.
2566 * c-typeck.c: Likewise.
2567 * gimple-parser.c: Likewise.
2568
3179ebae
JJ
25692018-11-09 Jakub Jelinek <jakub@redhat.com>
2570
81a227c6
JJ
2571 * c-parser.c (c_parser_omp_clause_final): Use
2572 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2573 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2574 parsing instead of c_parser_paren_condition.
2575 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2576 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2577 c_fully_fold instead of c_parser_condition.
2578 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2579 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2580 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2581 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2582 c_parser_expr_no_commas instead of c_parser_expression.
2583
98c91c56
JJ
2584 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2585 reduction clause with inscan modifier.
2586
3179ebae
JJ
2587 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2588 clauses other than atomic_default_mem_order.
2589
28567c40
JJ
25902018-11-08 Jakub Jelinek <jakub@redhat.com>
2591
2592 * c-parser.c: Include memmode.h.
2593 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2594 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2595 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2596 task_reduction clauses.
2597 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2598 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2599 section, or lvalue assignment expression.
2600 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2601 (c_parser_omp_clause_lastprivate): Parse optional
2602 conditional: modifier.
2603 (c_parser_omp_clause_hint): Require constant integer expression rather
2604 than just integer expression.
2605 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2606 clause.
2607 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2608 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2609 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2610 functions.
2611 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2612 iterators. Parse mutexinoutset and depobj kinds.
2613 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2614 callers.
2615 (c_parser_omp_all_clauses): Likewise. Handle
2616 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2617 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2618 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2619 default memory order from requires directive if any. Adjust
2620 c_finish_omp_atomic caller.
2621 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2622 (c_parser_omp_flush): Parse flush with memory-order-clause.
2623 (c_parser_omp_for_loop): Allow NE_EXPR even in
2624 OpenMP loops, adjust c_finish_omp_for caller.
2625 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2626 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2627 Allow to be called while parsing combined parallel master.
2628 Parse combined master taskloop{, simd}.
2629 (c_parser_omp_parallel): Parse combined
2630 parallel master{, taskloop{, simd}} constructs.
2631 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2632 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2633 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2634 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2635 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2636 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2637 around teams body. Use SET_EXPR_LOCATION.
2638 (c_parser_omp_target_data): Allow target data
2639 with only use_device_ptr clauses.
2640 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2641 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2642 (c_parser_omp_requires): New function.
2643 (c_finish_taskloop_clauses): New function.
2644 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2645 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2646 declaration. Disallow in_reduction clause when combined with parallel
2647 master.
2648 (c_parser_omp_construct): Adjust c_parser_omp_master and
2649 c_parser_omp_taskgroup callers.
2650 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2651 other than cancel.
2652 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2653 like OMP_CLAUSE_REDUCTION.
2654 (handle_omp_array_sections): Likewise. Call save_expr on array
2655 reductions before calling build_index_type. Handle depend clauses
2656 with iterators.
2657 (struct c_find_omp_var_s): New type.
2658 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2659 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2660 with static, runtime or auto schedule kinds. Call save_expr for whole
2661 array reduction sizes. Diagnose reductions with zero sized elements
2662 or variable length structures. Diagnose nogroup clause used with
2663 reduction clause(s). Handle depend clause with
2664 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2665 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2666 some different type for other kinds. Use build_unary_op with
2667 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2668 Handle depend clauses with iterators. Remove no longer needed special
2669 case that predetermined const qualified vars may be specified in
2670 firstprivate clause. Complain if const qualified vars are mentioned
2671 in data-sharing clauses other than firstprivate or shared. Use
2672 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2673 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2674 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2675 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2676
7e2de6df
DM
26772018-10-29 David Malcolm <dmalcolm@redhat.com>
2678
2679 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2680 logic for change to name_hint::operator bool.
2681 (undeclared_variable): Likewise.
2682 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2683 (c_parser_parameter_declaration): Likewise.
2684
9f936c86
JM
26852018-10-17 Joseph Myers <joseph@codesourcery.com>
2686
2687 * c-errors.c (pedwarn_c11): New function.
2688 * c-parser.c (disable_extension_diagnostics): Save
2689 warn_c11_c2x_compat and set it to 0.
2690 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2691 (c_parser_static_assert_declaration_no_semi): Handle
2692 _Static_assert without string constant.
2693 * c-tree.h (pedwarn_c11): New prototype.
2694
033eb567
DM
26952018-10-17 David Malcolm <dmalcolm@redhat.com>
2696
2697 * Make-lang.in (selftest-c): New.
2698 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2699 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2700 from gcc/Makefile.in.
2701
0edf3afe
RB
27022018-10-02 Richard Biener <rguenther@suse.de>
2703
2704 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2705
8313a764
JM
27062018-09-26 Joseph Myers <joseph@codesourcery.com>
2707
2708 PR c/87390
2709 * c-typeck.c (build_binary_op): Use excess precision for
2710 comparisons of integers and floating-point for C11 and later.
2711
ce6f0888
MJ
27122018-09-26 Martin Jambor <mjambor@suse.cz>
2713
2714 PR c/87347
2715 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2716 comment.
ce6f0888 2717
9c4a4b3c
DM
27182018-09-17 David Malcolm <dmalcolm@redhat.com>
2719
2720 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2721 Update for new param.
2722 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2723 Likewise.
2724
80c6d1f4
MJ
27252018-09-17 Martin Jambor <mjambor@suse.cz>
2726
2727 PR c/63886
2728 * c-parser.c: (warn_for_abs): New function.
2729 (c_parser_postfix_expression_after_primary): Call it.
2730
4a426e36
BE
27312018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2732
2733 * c-typeck.c (digest_init): Shorten overlength strings.
2734
6d900107
BE
27352018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2736
2737 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2738
b5764229
BE
27392018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2740
2741 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2742 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2743
22eea6b2
AM
27442018-08-30 Alexander Monakov <amonakov@ispras.ru>
2745
2746 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2747 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2748
85204e23
DM
27492018-08-27 David Malcolm <dmalcolm@redhat.com>
2750
2751 PR 87091
2752 * c-decl.c (implicitly_declare): Update call to
2753 maybe_add_include_fixit to suggest overriding the location, as it
2754 is for a note.
2755 * c-objc-common.c (c_tree_printer): Update for conversion of
2756 show_caret_p to a tri-state.
2757
3d78e008
ML
27582018-08-27 Martin Liska <mliska@suse.cz>
2759
2760 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2761 fndecl_built_in_p and remove check for FUNCTION_DECL if
2762 possible.
3d78e008
ML
2763 (diagnose_mismatched_decls): Likewise.
2764 (merge_decls): Likewise.
2765 (warn_if_shadowing): Likewise.
2766 (pushdecl): Likewise.
2767 (implicitly_declare): Likewise.
2768 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2769 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2770 * c-typeck.c (build_function_call_vec): Likewise.
2771 (convert_arguments): Likewise.
2772
097f82ec
DM
27732018-08-20 David Malcolm <dmalcolm@redhat.com>
2774
2775 PR other/84889
2776 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2777 (diagnose_mismatched_decls): Likewise, in various places.
2778 (warn_if_shadowing): Likewise.
2779 (implicit_decl_warning): Likewise.
2780 (implicitly_declare): Likewise.
2781 (undeclared_variable): Likewise.
2782 (declare_label): Likewise.
2783 (grokdeclarator): Likewise.
2784 (start_function): Likewise.
2785 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2786 (c_parser_parameter_declaration): Likewise.
2787 (c_parser_binary_expression): Likewise.
2788 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2789 (parser_build_binary_op): Likewise.
2790 (build_unary_op): Likewise.
2791 (error_init): Likewise.
2792 (pedwarn_init): Likewise.
2793 (warning_init): Likewise.
2794 (convert_for_assignment): Likewise.
2795
96e6ae57
DM
27962018-08-15 David Malcolm <dmalcolm@redhat.com>
2797
2798 * c-objc-common.c: Include "gcc-rich-location.h".
2799 (c_tree_printer): Move implemenation of '%T' to...
2800 (print_type): ...this new function.
2801 (range_label_for_type_mismatch::get_text): New function.
2802 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2803 range for the various ic_argpass cases.
2804 (class maybe_range_label_for_tree_type_mismatch): New class.
2805 (build_binary_op): Use it when calling binary_op_error.
2806
0cd020ae 28072018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2808
0cd020ae
PK
2809 * c-decl.c (start_decl): Do not warn if variables is named as main
2810 and is a local variable.
2811
72733314
IS
28122018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2813
2814 PR c/19315
2815 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2816 objects of unknown size.
2817
23aa9f7c
MS
28182018-08-13 Martin Sebor <msebor@redhat.com>
2819
2820 PR tree-optimization/71625
2821 * c-parser.c (c_parser_declaration_or_fndef): Call
2822 braced_list_to_string.
2823
e5e7e50d
BH
28242018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2825
2826 PR c/86690
2827 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2828 errors.
2829
8a45b051
MS
28302018-08-01 Martin Sebor <msebor@redhat.com>
2831
2832 PR tree-optimization/86650
2833 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2834 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2835
5922dcb5
JJ
28362018-08-01 Jakub Jelinek <jakub@redhat.com>
2837
2838 PR c/85704
2839 * c-typeck.c (init_field_decl_cmp): New function.
2840 (output_pending_init_elements): Use it for field comparisons
2841 instead of pure bit_position comparisons.
2842
9b452033
JJ
28432018-07-12 Jakub Jelinek <jakub@redhat.com>
2844
2845 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2846 type here, instead add "omp declare target implicit" attribute.
2847 (finish_decl): Diagnose vars without mappable type here.
2848
ab20d992
JJ
28492018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2850 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2851 Cesar Philippidis <cesar@codesourcery.com>
2852
2853 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2854 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2855 to their non-present_or_* counterparts. Make 'self' an alias to
2856 PRAGMA_OACC_CLAUSE_HOST.
2857 (c_parser_oacc_data_clause): Update GOMP mappings for
2858 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2859 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2860 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2861 Remove support for present_or_* clauses.
2862 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2863 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2864 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2865 (OACC_DATA_CLAUSE_MASK): Likewise.
2866 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2867 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2868 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2869 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2870 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2871
e197e64e
KV
28722018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2873
2874 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2875 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2876 (c_parser_gimple_unary_expression): Likewise.
2877
487f2f61
JJ
28782018-06-15 Jakub Jelinek <jakub@redhat.com>
2879
2880 PR c/86093
2881 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2882 before doing POINTER_DIFF_EXPR.
2883
e4d44a37
MP
28842018-06-07 Marek Polacek <polacek@redhat.com>
2885
2886 PR c/85318
2887 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2888 for loop initial declarations.
2889
b67b9225
DP
28902018-05-30 David Pagan <dave.pagan@oracle.com>
2891
2892 PR c/55976
2893 * c-decl.c (grokdeclarator): Update check for return type warnings.
2894 (start_function): Likewise.
2895 (finish_function): Likewise.
2896 * c-typeck.c (c_finish_return): Update check for return type warnings.
2897 Pass OPT_Wreturn_type to pedwarn when appropriate.
2898
c566cc9f
RS
28992018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2900
2901 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2902 __FMA_EXPR handlng.
2903
e4f81565
RS
29042018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2905
2906 * gimple-parser.c: Include internal-fn.h.
2907 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2908 (c_parser_gimple_call_internal): New function.
2909 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2910 Fix typos in comment.
2911
79e7b1fe
JJ
29122018-05-10 Jakub Jelinek <jakub@redhat.com>
2913
2914 PR c++/85662
2915 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2916 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2917 fold_convert_loc.
2918 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2919 fold_offsetof_1, pass argtype as TYPE to it and drop the
2920 fold_convert_loc.
2921
f7584c81
DP
29222018-05-02 David Pagan <dave.pagan@oracle.com>
2923
2924 PR c/30552
2925 * c-decl.c (old_style_parameter_scope): New function.
2926 * c-parser.c (c_parser_postfix_expression): Check for statement
2927 expressions in old-style function parameter list declarations.
2928 * c-parser.h (old_style_parameter_scope): New extern declaration.
2929
b33a0cb3
JJ
29302018-04-25 Jakub Jelinek <jakub@redhat.com>
2931
2932 PR sanitizer/84307
2933 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2934 it is not TREE_STATIC.
2935 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2936 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2937 its COMPOUND_LITERAL_EXPR_DECL.
2938
c5c5822a
JM
29392018-03-21 Joseph Myers <joseph@codesourcery.com>
2940
2941 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2942 where all functions return the same _FloatN or _FloatNx type,
2943 treat integer types as _Float64 instead of double.
2944
aa1c9429
JJ
29452018-03-21 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR c/84999
2948 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2949 building vector comparison, diagnose it and return error_mark_node.
2950
9bb45a95
JJ
29512018-03-15 Jakub Jelinek <jakub@redhat.com>
2952
2953 PR c/84853
2954 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2955 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2956 INTEGER_TYPE element type.
2957
ada6bad9
DP
29582018-03-13 David Pagan <dave.pagan@oracle.com>
2959
2960 PR c/46921
2961 * c-typeck.c (output_init_element): Ensure field initializer
2962 expression is always evaluated if there are side effects.
2963
849bbdb9
JJ
29642018-03-06 Jakub Jelinek <jakub@redhat.com>
2965
2966 PR c/84721
2967 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2968 !building_stmt_list_p ().
2969
d74641bd
RS
29702018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2971
2972 PR c/84305
2973 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2974 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2975 and include the BIND_EXPR in the list of things that need to be
2976 pre-evaluated.
2977
0444aa9c
NS
29782018-02-09 Nathan Sidwell <nathan@acm.org>
2979
2980 PR c/84293
2981 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2982 to strict_aliasing_warning.
2983
7c30b12a
PC
29842018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2985
2986 * c-typeck.c (really_start_incremental_init, push_init_level,
2987 set_nonincremental_init, output_init_element, process_init_element):
2988 Use DECL_UNNAMED_BIT_FIELD.
2989
2be4dfcb
MP
29902018-01-31 Marek Polacek <polacek@redhat.com>
2991
2992 PR c/81779
2993 * c-parser.c (c_parser_compound_statement_nostart): Call
2994 expansion_point_location_if_in_system_header.
2995
bb9869d5
DM
29962018-01-17 David Malcolm <dmalcolm@redhat.com>
2997
2998 PR c++/83814
2999 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3000 the C part.
3001
b4923738
JJ
30022018-01-13 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR c/83801
3005 * c-tree.h (decl_constant_value_1): Add a bool argument.
3006 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3007 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3008 (decl_constant_value): Adjust caller.
3009 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3010 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3011 decl_constant_value returns initializer that has BLKmode or
3012 array type.
3013 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3014
928686b1
RS
30152018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3016 Alan Hayward <alan.hayward@arm.com>
3017 David Sherwood <david.sherwood@arm.com>
3018
3019 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3020 TYPE_VECTOR_SUBPARTS.
3021
85ec4feb
JJ
30222018-01-03 Jakub Jelinek <jakub@redhat.com>
3023
3024 Update copyright years.
3025
913884f7
JJ
30262018-01-01 Jakub Jelinek <jakub@redhat.com>
3027
3028 PR c/83595
3029 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3030 c_parser_conditional_expression, c_parser_cast_expression,
3031 c_parser_sizeof_expression, c_parser_alignof_expression,
3032 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3033 c_parser_transaction_expression): Use set_error () method instead
3034 of setting value member to error_mark_node.
3035
c6cfa2bf
MM
30362017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3037
3038 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3039 and _Float<N>X built-in functions.
3040
11d29d63
JJ
30412017-12-22 Jakub Jelinek <jakub@redhat.com>
3042
14ec014e
JJ
3043 PR debug/83550
3044 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3045 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3046 incomplete vars rather than after it.
3047
11d29d63
JJ
3048 PR debug/83547
3049 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3050 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3051 and consider empty ones if there are no other stmts. For
3052 -Wunused-value walk all statements before the one only followed by
3053 DEBUG_BEGIN_STMTs.
3054
170a8bd6 30552017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3056 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3057
3058 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3059 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3060 (c_parser_do_statement): Likewise.
3061 (c_parser_for_statement): Likewise.
3062 (c_parser_statement_after_labels): Adjust calls to above.
3063 (c_parse_pragma_ivdep): New static function.
3064 (c_parser_pragma_unroll): Likewise.
3065 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3066 <PRAGMA_UNROLL>: New case.
3067
01512446
JJ
30682017-12-19 Jakub Jelinek <jakub@redhat.com>
3069
3070 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3071 perform_integral_promotions, digest_init): Replace Yoda conditions
3072 with typical order conditions.
3073 * c-decl.c (check_bitfield_type_and_width): Likewise.
3074
c65e18d3
BE
30752017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3076
3077 * c-typeck.c (c_safe_arg_type_equiv_p,
3078 c_safe_function_type_cast_p): New function.
3079 (build_c_cast): Implement -Wcast-function-type.
3080
b7280579
RB
30812017-12-14 Richard Biener <rguenther@suse.de>
3082
3083 PR c/83415
3084 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3085 like REALPART_EXPR for the behavior of whether its operand
3086 is an lvalue.
3087
49e6a6c0
MP
30882017-12-12 Marek Polacek <polacek@redhat.com>
3089
3090 PR c/82679
3091 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3092
ab20d992 30932017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3094
3095 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3096 * c-parser.c (add_debug_begin_stmt): New.
3097 (c_parser_declaration_or_fndef): Call it.
3098 (c_parser_compound_statement_nostart): Likewise.
3099 (c_parser_statement_after_labels): Likewise.
3100 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3101
4b2b493f
JM
31022017-12-07 Joseph Myers <joseph@codesourcery.com>
3103
3104 * c-decl.c (build_compound_literal): Add parameter alignas_align
3105 and set alignment of decl if nonzero.
3106 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3107 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3108 qualifier.
3109 (c_parser_struct_declaration): Update syntax comment.
3110 (c_parser_type_name): Add alignas_ok argument and pass it to
3111 c_parser_declspecs.
3112 (c_parser_cast_expression): Pass true to c_parser_type_name and
3113 give error if a cast used an _Alignas specifier.
3114 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3115 give error if sizeof (type-name) used an _Alignas specifier.
3116 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3117 give error if _Alignof (type-name) used an _Alignas specifier.
3118 (c_parser_postfix_expression_after_paren_type): Check specified
3119 alignment for a compound literal and pass it to
3120 build_compound_literal.
3121 * c-parser.h (c_parser_type_name): Update prototype.
3122 * c-tree.h (build_compound_literal): Update prototype.
3123
5d9ae53d
MS
31242017-12-07 Martin Sebor <msebor@redhat.com>
3125
3126 PR c/81544
3127 * c-decl.c (c_decl_attributes): Look up existing declaration and
3128 pass it to decl_attributes.
3129
c79144f8
DM
31302017-12-06 David Malcolm <dmalcolm@redhat.com>
3131
3132 PR c/83236
3133 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3134 reserved for use by the implementation.
3135
613bc14f
DM
31362017-12-06 David Malcolm <dmalcolm@redhat.com>
3137
3138 * c-decl.c: Include "c-family/c-spellcheck.h".
3139
05abad4c
ML
31402017-12-05 Martin Liska <mliska@suse.cz>
3141 Jakub Jelinek <jakub@redhat.com>
3142
3143 * c-typeck.c (pointer_diff): Add new argument and instrument
3144 pointer subtraction.
3145 (build_binary_op): Similar for pointer comparison.
3146
cc6534d4
JJ
31472017-12-01 Jakub Jelinek <jakub@redhat.com>
3148
65791f42
JJ
3149 PR c/79153
3150 * c-parser.c: Include tree-iterator.h.
3151 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3152 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3153 on it.
3154
cc6534d4
JJ
3155 PR c/83222
3156 * c-tree.h (decl_constant_value_1): Declare.
3157 * c-typeck.c (decl_constant_value_1): New function.
3158 (decl_constant_value): Use it.
3159 * c-fold.c (c_fully_fold_internal): If in_init, use
3160 decl_constant_value_1 instead of decl_constant_value.
3161
5de73c05
JJ
31622017-11-30 Jakub Jelinek <jakub@redhat.com>
3163
3164 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3165
058f0b9e
JJ
31662017-11-28 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR sanitizer/81275
3169 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3170 c_switch_covers_all_cases_p returns true.
3171
5e9d6aa4 31722017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3173 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3174
3175 * Make-lang.in (c/c-array-notation.o): Remove.
3176 * c-array-notation.c: Delete.
3177 * c-decl.c: Remove cilkplus condition.
3178 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3179 c_parser_cilk_verify_simd, c_parser_array_notation,
3180 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3181 c_parser_cilk_simd_fn_vector_attrs,
3182 c_finish_cilk_simd_fn_tokens): Delete.
3183 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3184 (c_parser_direct_declarator_inner): Ditto.
3185 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3186 (c_parser_attributes, c_parser_compound_statement,
3187 c_parser_statement_after_labels, c_parser_if_statement,
3188 c_parser_switch_statement, c_parser_while_statement,
3189 c_parser_do_statement, c_parser_for_statement,
3190 c_parser_unary_expression, c_parser_postfix_expression,
3191 c_parser_postfix_expression_after_primary,
3192 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3193 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3194 support.
3195 * c-typeck.c (build_array_ref, build_function_call_vec,
3196 convert_arguments,
3197 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3198 c_finish_loop, build_binary_op): Remove cilkplus support.
3199
9e851845
JJ
32002017-11-28 Jakub Jelinek <jakub@redhat.com>
3201
3202 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3203 of build3.
3204
ab20d992 32052017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3206
3207 * Make-lang.in (c.install-plugin): Install backend import library.
3208
41521dee
JJ
32092017-11-23 Jakub Jelinek <jakub@redhat.com>
3210
3211 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3212 pragma_stmt context.
3213
ac9effed
EB
32142017-11-23 Mike Stump <mikestump@comcast.net>
3215 Eric Botcazou <ebotcazou@adacore.com>
3216
3217 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3218 ANNOTATE_EXPR.
3219 (c_parser_do_statement): Likewise.
3220 (c_parser_for_statement): Likewise.
3221
ce95abc4
DM
32222017-11-22 David Malcolm <dmalcolm@redhat.com>
3223
3224 PR c++/62170
3225 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3226 bool to bool *. Within '%T' handling, if showing an "aka", use
3227 "quoted" param to add appropriate quoting.
3228
974aedcc
MP
32292017-11-22 Marek Polacek <polacek@redhat.com>
3230
3231 PR c++/60336
3232 PR middle-end/67239
3233 PR target/68355
3234 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3235
d4300cc6
DM
32362017-11-21 David Malcolm <dmalcolm@redhat.com>
3237
3238 PR c/83056
3239 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3240 earlier failed lookups.
3241
1af4ebf5
MG
32422017-11-21 Marc Glisse <marc.glisse@inria.fr>
3243
3244 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3245 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3246
26edace6
DM
32472017-11-20 David Malcolm <dmalcolm@redhat.com>
3248
3249 PR c/81404
3250 * c-decl.c: Include "c-family/known-headers.h".
3251 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3252 to known-headers.cc.
3253 (class suggest_missing_header): Move to known-header.h.
3254 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3255 than get_c_name_hint.
3256
b1212255
DM
32572017-11-20 David Malcolm <dmalcolm@redhat.com>
3258
3259 * c-decl.c (get_c_name_hint): New function.
3260 (class suggest_missing_header): New class.
3261 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3262 suggest missing headers to the user.
3263
6c7a259b
DM
32642017-11-20 David Malcolm <dmalcolm@redhat.com>
3265
3266 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3267 Include "c-family/name-hint.h"
3268 (implicit_decl_warning): Convert "hint" from
3269 const char * to name_hint. Pass location to
3270 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3271 warning was not printed.
3272 (undeclared_variable): Likewise for "guessed_id".
3273 (lookup_name_fuzzy): Convert return type from const char *
3274 to name_hint. Add location_t param.
3275 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3276 Include "c-family/name-hint.h"
3277 (c_parser_declaration_or_fndef): Convert "hint" from
3278 const char * to name_hint. Pass location to lookup_name_fuzzy.
3279 (c_parser_parameter_declaration): Likewise.
3280
f9c59f7e
JJ
32812017-11-19 Jakub Jelinek <jakub@redhat.com>
3282
3283 PR c/66618
3284 PR c/69960
3285 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3286 where needed.
3287 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3288 handle_omp_array_sections): Likewise.
3289 (digest_init): Don't call decl_constant_value_for_optimization.
3290 * c-tree.h (decl_constant_value_for_optimization): Removed.
3291 * c-fold.c (c_fold_array_ref): New function.
3292 (c_fully_fold_internal): Add LVAL argument, propagate it through
3293 recursive calls. For VAR_P call decl_constant_value and
3294 unshare if not LVAL and either optimizing or IN_INIT. Remove
3295 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3296 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3297 (c_fully_fold): Add LVAL argument, pass it through to
3298 c_fully_fold_internal.
3299 (decl_constant_value_for_optimization): Removed.
3300
3ca0dc60
JM
33012017-11-15 Joseph Myers <joseph@codesourcery.com>
3302
3303 PR c/81156
3304 * c-parser.c (check_tgmath_function): New function.
3305 (enum tgmath_parm_kind): New enum.
3306 (c_parser_postfix_expression): Handle __builtin_tgmath.
3307
64a5912c
DM
33082017-10-31 David Malcolm <dmalcolm@redhat.com>
3309
3310 * c-decl.c (implicit_decl_warning): Update for renaming of
3311 pedwarn_at_rich_loc and warning_at_rich_loc.
3312 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3313 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3314 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3315 (c_parser_struct_or_union_specifier): Likewise for renaming of
3316 pedwarn_at_rich_loc.
3317 (c_parser_parameter_declaration): Likewise for renaming of
3318 error_at_rich_loc.
3319 * c-typeck.c (build_component_ref): Likewise.
3320 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3321 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3322 (set_init_label): Likewise for renaming of error_at_rich_loc.
3323
c1136864
RB
33242017-10-30 Richard Biener <rguenther@suse.de>
3325
3326 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3327 stmts.
3328
ee5fd23a
MM
33292017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3330
3331 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3332 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3333
1a59ccf2
DM
33342017-10-25 David Malcolm <dmalcolm@redhat.com>
3335
3336 PR c/7356
3337 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3338 semicolons.
3339
bc1a75dd
JJ
33402017-10-25 Jakub Jelinek <jakub@redhat.com>
3341
3342 PR libstdc++/81706
3343 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3344 newdecl to corresponding __builtin_ if any.
3345
ff1ff960
PC
33462017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3347
3348 PR c++/82466
3349 * c-decl.c (diagnose_mismatched_decls): Use
3350 OPT_Wbuiltin_declaration_mismatch.
3351
62e1c678
DM
33522017-10-12 David Malcolm <dmalcolm@redhat.com>
3353
3354 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3355 use it to guard calls to maybe_suggest_missing_token_insertion.
3356 (c_parser_parms_list_declarator): Override default value of new
3357 "type_is_unique" param to c_parser_require.
3358 (c_parser_asm_statement): Likewise.
3359 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3360 defaulting to true.
3361
a92f6726
NS
33622017-10-11 Nathan Sidwell <nathan@acm.org>
3363
3364 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3365
8e6cdc90
RS
33662017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3367
3368 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3369 operating on trees as wide_ints.
3370 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3371 (c_tree_equal): Likewise.
3372
8139a48e
DM
33732017-10-04 David Malcolm <dmalcolm@redhat.com>
3374
3375 * c-decl.c (push_parm_decl): Store c_parm's location into the
3376 PARAM_DECL.
3377 (build_c_parm): Add "loc" param and store it within the c_parm.
3378 * c-parser.c (struct c_parser): Add "last_token_location" field.
3379 (c_parser_consume_token): Store location of the token into the
3380 new field.
3381 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3382 when handling a FUNCTION_DECL, if it doesn't already have them.
3383 (c_parser_parameter_declaration): Generate a location for the
3384 parameter, and pass it to the call to build_c_parm.
3385 * c-tree.h (struct c_parm): Add field "loc".
3386 (build_c_parm): Add location_t param.
3387 * c-typeck.c (get_fndecl_argument_location): New function.
3388 (inform_for_arg): New function.
3389 (convert_for_assignment): Use inform_for_arg when dealing with
3390 ic_argpass.
3391
2a389958
JJ
33922017-09-29 Jakub Jelinek <jakub@redhat.com>
3393
7d386d45
JJ
3394 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3395 width is non-NULL.
3396 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3397 don't SET_DECL_C_BIT_FIELD here.
3398
2a389958
JJ
3399 PR c/82340
3400 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3401 instead of trying to set just TREE_READONLY manually.
3402
ebc6a85e
TV
34032017-09-16 Tom de Vries <tom@codesourcery.com>
3404
3405 PR c/81875
3406 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3407 cond itself.
3408
bb75facd
JM
34092017-09-15 Joseph Myers <joseph@codesourcery.com>
3410
3411 PR c/82071
3412 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3413 for C11.
3414 (build_conditional_expr): For C11, generate result with excess
3415 precision when one argument is an integer and the other is of a
3416 type using excess precision.
3417
1d933576
BE
34182017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3419
3420 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3421
267bbb6f
MP
34222017-09-13 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/82167
3425 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3426 than expr.original_type.
3427
6836632e
NS
34282017-09-12 Nathan Sidwell <nathan@acm.org>
3429
3430 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3431 resort_sorted_fields): Moved from c-family/c-common.c.
3432 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3433
e035be33
JM
34342017-09-01 Joseph Myers <joseph@codesourcery.com>
3435
3436 PR c/82071
3437 * c-typeck.c (build_atomic_assign): Handle argument with excess
3438 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3439 argument passed to build_binary_op and convert_for_assignment but
3440 not for call to c_fully_fold.
3441 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3442 Ensure build_binary_op is called with argument with original
3443 semantic type. Avoid calling c_fully_fold with an
3444 EXCESS_PRECISION_EXPR from build_binary_op.
3445
d2e05fcb
JJ
34462017-09-01 Jakub Jelinek <jakub@redhat.com>
3447
3448 PR c/81887
3449 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3450
b397965c
RS
34512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3452 Alan Hayward <alan.hayward@arm.com>
3453 David Sherwood <david.sherwood@arm.com>
3454
3455 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3456 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3457 m1 and m2 to the signed equivalent of a fixed-point
3458 SCALAR_TYPE_MODE.
3459
14e18d71
DM
34602017-08-24 David Malcolm <dmalcolm@redhat.com>
3461
3462 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3463 than CAN_HAVE_LOCATION_P when determining whether to use the
3464 location_t value within "value".
3465
7f204c0f
DM
34662017-08-21 David Malcolm <dmalcolm@redhat.com>
3467
3468 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3469 rather than peeking the location of the first token.
3470 * c-tree.h (c_expr::get_location): New method.
3471
2f687306
DM
34722017-08-21 David Malcolm <dmalcolm@redhat.com>
3473
3474 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3475 to check_function_arguments.
3476
3e7b80d7
MP
34772017-08-18 Marek Polacek <polacek@redhat.com>
3478
3479 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3480 commentary.
3481
00aa1fa2
L
34822017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3483
3484 PR c/53037
3485 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3486 (check_bitfield_type_and_width): Don't allow bit-field with
3487 warn_if_not_aligned type.
3488
da67acb9
MS
34892017-08-14 Martin Sebor <msebor@redhat.com>
3490
3491 PR c/81117
3492 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3493
bb85aa74
MP
34942017-08-11 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/81795
3497 * c-decl.c (pushtag): Only print inform if the warning was printed.
3498 (grokdeclarator): Likewise.
3499
32129a17
DM
35002017-08-10 David Malcolm <dmalcolm@redhat.com>
3501
3502 * c-parser.c (c_parser_error): Rename to...
3503 (c_parser_error_richloc): ...this, making static, and adding
3504 "richloc" parameter, passing it to the c_parse_error call,
3505 rather than calling c_parser_set_source_position_from_token.
3506 (c_parser_error): Reintroduce, reimplementing in terms of the
3507 above, converting return type from void to bool.
3508 (class token_pair): New class.
3509 (struct matching_paren_traits): New struct.
3510 (matching_parens): New typedef.
3511 (struct matching_brace_traits): New struct.
3512 (matching_braces): New typedef.
3513 (get_matching_symbol): New function.
3514 (c_parser_require): Add param MATCHING_LOCATION, using it to
3515 highlight matching "opening" tokens for missing "closing" tokens.
3516 (c_parser_skip_until_found): Likewise.
3517 (c_parser_static_assert_declaration_no_semi): Convert explicit
3518 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3519 class matching_parens, so that the pertinent open parenthesis is
3520 highlighted when there are problems locating the close
3521 parenthesis.
3522 (c_parser_struct_or_union_specifier): Likewise.
3523 (c_parser_typeof_specifier): Likewise.
3524 (c_parser_alignas_specifier): Likewise.
3525 (c_parser_simple_asm_expr): Likewise.
3526 (c_parser_braced_init): Likewise, for matching_braces.
3527 (c_parser_paren_condition): Likewise, for matching_parens.
3528 (c_parser_switch_statement): Likewise.
3529 (c_parser_for_statement): Likewise.
3530 (c_parser_asm_statement): Likewise.
3531 (c_parser_asm_operands): Likewise.
3532 (c_parser_cast_expression): Likewise.
3533 (c_parser_sizeof_expression): Likewise.
3534 (c_parser_alignof_expression): Likewise.
3535 (c_parser_generic_selection): Likewise.
3536 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3537 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3538 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3539 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3540 c_parser_skip_until_found call.
3541 (c_parser_objc_class_definition): Use class matching_parens as
3542 above.
3543 (c_parser_objc_method_decl): Likewise.
3544 (c_parser_objc_try_catch_finally_statement): Likewise.
3545 (c_parser_objc_synchronized_statement): Likewise.
3546 (c_parser_objc_at_property_declaration): Likewise.
3547 (c_parser_oacc_wait_list): Likewise.
3548 (c_parser_omp_var_list_parens): Likewise.
3549 (c_parser_omp_clause_collapse): Likewise.
3550 (c_parser_omp_clause_default): Likewise.
3551 (c_parser_omp_clause_if): Likewise.
3552 (c_parser_omp_clause_num_threads): Likewise.
3553 (c_parser_omp_clause_num_tasks): Likewise.
3554 (c_parser_omp_clause_grainsize): Likewise.
3555 (c_parser_omp_clause_priority): Likewise.
3556 (c_parser_omp_clause_hint): Likewise.
3557 (c_parser_omp_clause_defaultmap): Likewise.
3558 (c_parser_oacc_single_int_clause): Likewise.
3559 (c_parser_omp_clause_ordered): Likewise.
3560 (c_parser_omp_clause_reduction): Likewise.
3561 (c_parser_omp_clause_schedule): Likewise.
3562 (c_parser_omp_clause_num_teams): Likewise.
3563 (c_parser_omp_clause_thread_limit): Likewise.
3564 (c_parser_omp_clause_aligned): Likewise.
3565 (c_parser_omp_clause_linear): Likewise.
3566 (c_parser_omp_clause_safelen): Likewise.
3567 (c_parser_omp_clause_simdlen): Likewise.
3568 (c_parser_omp_clause_depend): Likewise.
3569 (c_parser_omp_clause_map): Likewise.
3570 (c_parser_omp_clause_device): Likewise.
3571 (c_parser_omp_clause_dist_schedule): Likewise.
3572 (c_parser_omp_clause_proc_bind): Likewise.
3573 (c_parser_omp_clause_uniform): Likewise.
3574 (c_parser_omp_for_loop): Likewise.
3575 (c_parser_cilk_clause_vectorlength): Likewise.
3576 (c_parser_cilk_clause_linear): Likewise.
3577 (c_parser_transaction_expression): Likewise.
3578 * c-parser.h (c_parser_require): Add param matching_location with
3579 default UNKNOWN_LOCATION.
3580 (c_parser_error): Convert return type from void to bool.
3581 (c_parser_skip_until_found): Add param matching_location with
3582 default UNKNOWN_LOCATION.
3583
30af3a2b
MP
35842017-08-09 Marek Polacek <polacek@redhat.com>
3585
3586 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3587 * c-tree.h (build_external_ref): Update declaration.
3588 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3589 (build_external_ref): Change the type of a parameter to bool.
3590 (parser_build_binary_op): Use true/false instead of 1/0.
3591 (pointer_diff): Likewise.
3592 (build_modify_expr): Likewise.
3593 (set_designator): Change the type of a parameter to bool.
3594 (set_init_index): Use true/false instead of 1/0.
3595 (set_init_label): Likewise.
3596 (output_init_element): Change the type of a parameter to bool.
3597 (output_pending_init_elements): Use true/false instead of 1/0.
3598 (process_init_element): Likewise.
3599 (build_binary_op): Change the type of a parameter to bool.
3600
296c53ac
MP
36012017-08-09 Marek Polacek <polacek@redhat.com>
3602
3603 PR c/81233
3604 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3605 Call emit_diagnostic_valist instead of pedwarn.
3606 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3607 Print the relevant types in diagnostics.
3608
a32c8316
MP
36092017-08-09 Marek Polacek <polacek@redhat.com>
3610
3611 PR c/81417
3612 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3613 build_conditional_expr.
a32c8316
MP
3614 * c-parser.c (c_parser_conditional_expression): Create locations for
3615 EXP1 and EXP2 from their source ranges. Pass the locations down to
3616 build_conditional_expr.
3617 * c-tree.h (build_conditional_expr): Update declaration.
3618 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3619 For -Wsign-compare, also print the types.
3620
314e6352
ML
36212017-08-08 Martin Liska <mliska@suse.cz>
3622
3623 * c-convert.c: Include header files.
3624 * c-typeck.c: Likewise.
3625
577eec56
ML
36262017-08-07 Martin Liska <mliska@suse.cz>
3627
3628 * c-parser.c (c_parser_attributes): Canonicalize name of an
3629 attribute.
3630
f7b6353a
MP
36312017-08-02 Marek Polacek <polacek@redhat.com>
3632
3633 PR c/81289
3634 * c-parser.c (c_parser_unary_expression): Use set_error.
3635
8a6eab34
MP
3636 PR c/81448
3637 PR c/81306
3638 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3639 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3640
ab20d992 36412017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3642 Martin Liska <mliska@suse.cz>
3643
3644 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3645 statement.
7fef86d3 3646
f34ebeb2
ML
36472017-07-31 Martin Liska <mliska@suse.cz>
3648
3649 PR sanitize/81530
3650 * c-convert.c (convert): Guard condition with flag_sanitize_p
3651 also with current_function_decl non-null equality.
3652 * c-decl.c (grokdeclarator): Likewise.
3653 * c-typeck.c (build_binary_op): Likewise.
3654
8595f67b
MP
36552017-07-25 Marek Polacek <polacek@redhat.com>
3656
3657 * c-decl.c (grokfield): Remove local variable.
3658
d49718d6
MP
36592017-07-25 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/81364
3662 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3663 macro expansion if the body is in { }.
3664 (c_parser_while_statement): Likewise.
3665 (c_parser_for_statement): Likewise.
3666
ff22eb12
NS
36672017-07-18 Nathan Sidwell <nathan@acm.org>
3668
3669 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3670
eea77d1f
DM
36712017-07-14 David Malcolm <dmalcolm@redhat.com>
3672
3673 * c-decl.c (implicitly_declare): When suggesting a missing
3674 #include, provide a fix-it hint.
3675
b6f43128
DM
36762017-07-06 David Malcolm <dmalcolm@redhat.com>
3677
3678 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3679 and call that instead.
3680 * c-tree.h (selftest::run_c_tests): New decl.
3681
3e2becc4
MP
36822017-06-26 Marek Polacek <polacek@redhat.com>
3683
3684 PR c/80116
3685 * c-parser.c (c_parser_if_body): Set the location of the
3686 body of the conditional after parsing all the labels. Call
3687 warn_for_multistatement_macros.
3688 (c_parser_else_body): Likewise.
3689 (c_parser_switch_statement): Likewise.
3690 (c_parser_while_statement): Likewise.
3691 (c_parser_for_statement): Likewise.
3692 (c_parser_statement): Add a default argument. Save the location
3693 after labels have been parsed.
3694 (c_parser_c99_block_statement): Likewise.
3695
343ae898
RB
36962017-06-19 Richard Biener <rguenther@suse.de>
3697
3698 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3699 negated _Literals to parse _Literal (int) -1.
3700
45b2222a
ML
37012017-06-13 Martin Liska <mliska@suse.cz>
3702
3703 PR sanitize/78204
3704 * c-convert.c (convert): Use sanitize_flags_p.
3705 * c-decl.c (grokdeclarator): Likewise.
3706 * c-typeck.c (convert_for_assignment): Likewise.
3707 (c_finish_return): Likewise.
3708 (build_binary_op): Likewise.
3709
8ab7005b
JJ
37102017-06-08 Jakub Jelinek <jakub@redhat.com>
3711
3712 PR c/81006
3713 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3714 to sizetype before size_binop.
3715
363dc72c
JJ
37162017-06-07 Jakub Jelinek <jakub@redhat.com>
3717
3718 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3719 of TDI_generic.
3720
dc949728
MP
37212017-06-06 Marek Polacek <polacek@redhat.com>
3722
3723 PR c/79983
3724 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3725 ref.
3726 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3727
40ffd95f
BE
37282017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3729
3730 * c-parser.c (c_parser_binary_expression): Implement the
3731 -Wsizeof_pointer_div warning.
3732 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3733 from a parenthesized expression.
3734 (c_parser_expr_list): Use c_last_sizeof_loc.
3735 * c-tree.h (c_last_sizeof_loc): New external.
3736 * c-typeck.c (c_last_sizeof_loc): New variable.
3737 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3738
9fc5e7a4
MM
37392017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3740
3741 PR testsuite/80580
3742 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3743
f012c8ef
DM
37442017-05-30 David Malcolm <dmalcolm@redhat.com>
3745
3746 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3747 parameters.
3748
3cd211af
MS
37492017-05-24 Martin Sebor <msebor@redhat.com>
3750
3751 PR c/80731
3752 * c-fold.c (c_fully_fold_internal): Adjust.
3753 * c-typeck.c (parser_build_unary_op): Adjust.
3754
fd71a9a2
TS
37552017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3756
3757 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3758 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3759 "VECTOR_LENGTH".
3760
92fa0f9e
MP
37612017-05-23 Marek Polacek <polacek@redhat.com>
3762
3763 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3764 quotes.
3765
d11c168a
JJ
37662017-05-22 Jakub Jelinek <jakub@redhat.com>
3767
3768 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3769 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3770 it returned invariant. Call tree_invariant_p unconditionally
3771 afterwards to decide whether to return expr or op0.
3772
58aca9d9
NS
37732017-05-22 Nathan Sidwell <nathan@acm.org>
3774
3775 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3776
7fd549d2
TS
37772017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3778
3779 * c-parser.c (c_parser_omp_clause_default): Handle
3780 "OMP_CLAUSE_DEFAULT_PRESENT".
3781
6ecd2339
BE
37822017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3783
3784 * config-lang.in (gtfiles): Add c-family/c-format.c.
3785
8a57ecff
NS
37862017-05-18 Nathan Sidwell <nathan@acm.org>
3787
3788 * c-decl.c (pushdecl_top_level): Delete unused function.
3789
6574d78e
MP
37902017-05-18 Marek Polacek <polacek@redhat.com>
3791
3792 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3793 (check_earlier_gotos): Likewise.
3794 (define_label): Likewise.
3795 (pending_xref_error): Likewise.
3796 (smallest_type_quals_location): Likewise.
3797 (grokdeclarator): Likewise.
3798 (grokparms): Likewise.
3799 (identifier_global_value): Likewise.
3800 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3801 (find_init_member): Likewise.
3802
e3455240
MP
38032017-05-18 Marek Polacek <polacek@redhat.com>
3804
3805 * c-decl.c (start_decl): Use false/true instead of 0/1.
3806 (grokdeclarator): Likewise.
3807 (finish_struct): Likewise.
3808 (start_function): Change the return type to bool. Use false/true
3809 instead of 0/1.
3810 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3811 * c-tree.h (start_function): Update.
3812 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3813 (set_designator): Change the return type to bool. Use false/true
3814 instead of 0/1.
3815
3fa8871b
MP
38162017-05-17 Marek Polacek <polacek@redhat.com>
3817
3818 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3819 * c-typeck.c: Likewise.
3820
142473df
MP
38212017-05-17 Marek Polacek <polacek@redhat.com>
3822
3823 PR sanitizer/80659
3824 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3825 DECL_IGNORED_P even for non-static compound literals.
3826
1a817418
ML
38272017-05-17 Martin Liska <mliska@suse.cz>
3828
3829 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3830 use it instead of int type.
3831
b2fa0a8b
MP
38322017-05-17 Marek Polacek <polacek@redhat.com>
3833
3834 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3835 call c_fully_fold.
3836 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3837 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3838 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3839 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3840 save_expr.
3841 (c_parser_conditional_expression): Likewise.
3842 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3843 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3844 (process_init_element): Likewise.
3845 (build_binary_op): Likewise.
3846 (handle_omp_array_sections_1): Likewise.
3847
1e47f02b
TS
38482017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3849
3850 * c-parser.c (c_parser_omp_clause_num_gangs)
3851 (c_parser_omp_clause_num_workers)
3852 (c_parser_omp_clause_vector_length): Merge functions into...
3853 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3854 all users.
3855
c24e924f
NS
38562017-05-11 Nathan Sidwell <nathan@acm.org>
3857
3858 * gimple-parser.c: Don't #include tree-dump.h.
3859
c587104e
MM
38602017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3861
3862 PR testsuite/80580
3863 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3864
67ac9a9d
MM
38652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3866
3867 PR testsuite/80580
3868 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3869 incorrect __MEM syntax.
3870
ac4eb40f
MM
38712017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3872
3873 PR testsuite/80580
3874 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3875 type of unary '*'.
3876
641da50a
NS
38772017-05-09 Nathan Sidwell <nathan@acm.org>
3878
3879 * c-tree.h (pushdecl): Declare.
3880
56d35585
DM
38812017-05-05 David Malcolm <dmalcolm@redhat.com>
3882
3883 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3884 with diagnostic_report_diagnostic.
3885 * c-errors.c (pedwarn_c99): Likewise.
3886 (pedwarn_c90): Likewise.
3887
815d9cc6
XR
38882017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3889
92a285c1 3890 PR c++/80038
815d9cc6
XR
3891 * c-gimplify.c (c_gimplify_expr): Remove calls to
3892 cilk_gimplifY_call_params_in_spawned_fn.
3893
1c4ea66f
DM
38942017-04-25 David Malcolm <dmalcolm@redhat.com>
3895
3896 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3897 hint for removing extra semicolon.
3898
666f7903
JJ
38992017-04-21 Jakub Jelinek <jakub@redhat.com>
3900
3901 PR c/80468
3902 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3903 enabled, set specs->type to integer_type_node.
3904
5764ee3c
JW
39052017-04-03 Jonathan Wakely <jwakely@redhat.com>
3906
3907 * c-array-notation.c: Fix typo in comment.
3908
10fa8dfb
MP
39092017-03-29 Marek Polacek <polacek@redhat.com>
3910
3911 PR c/79730
3912 * c-decl.c (finish_decl): Check VAR_P.
3913
a9e4a1a5
JJ
39142017-03-27 Jakub Jelinek <jakub@redhat.com>
3915
3916 PR middle-end/80162
3917 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3918 * c-typeck.c (c_mark_addressable): Likewise. Look through
3919 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3920 to ARRAY_TYPE.
3921 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3922
ee3ff394
MP
39232017-03-23 Marek Polacek <polacek@redhat.com>
3924
3925 * c-tree.h: Remove a C_RID_YYCODE reference.
3926
4d1b8e70
JJ
39272017-03-21 Jakub Jelinek <jakub@redhat.com>
3928
3929 PR c/80097
3930 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3931 optional COMPOUND_EXPR with ubsan instrumentation.
3932
31dc71a8
MP
39332017-03-17 Marek Polacek <polacek@redhat.com>
3934
3935 * c-parser.c: Add C11 references.
3936
d579c385
MP
39372017-03-15 Marek Polacek <polacek@redhat.com>
3938
3939 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3940
85059a38
MP
39412017-03-11 Marek Polacek <polacek@redhat.com>
3942
3943 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3944
2f6f187a
DM
39452017-03-10 David Malcolm <dmalcolm@redhat.com>
3946
3947 PR translation/79848
3948 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3949 "%qs".
3950 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3951
36618428
MP
39522017-03-09 Marek Polacek <polacek@redhat.com>
3953
3954 PR sanitizer/79757
3955 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3956 parameter declarations with initializers.
3957
01e5af5a
JJ
39582017-03-09 Jakub Jelinek <jakub@redhat.com>
3959
3960 PR c/79969
3961 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3962 TYPE_STUB_DECL.
3963
a71dbc63
JJ
39642017-03-07 Jakub Jelinek <jakub@redhat.com>
3965
3966 PR c/79834
3967 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3968 for "may only be used in compound statements" diagnostics, change it
3969 such that the same translatable string is used for all pragmas. For
3970 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3971 diagnostics.
3972 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3973 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3974 "may only be used in compound statements" diagnostics, such that the
3975 same translatable string is used for all pragmas.
3976
1ff4bae6
MP
39772017-03-04 Marek Polacek <polacek@redhat.com>
3978
3979 PR c/79847
3980 * c-decl.c (implicit_decl_warning): Add missing space.
3981
7f5a7d78
MP
39822017-03-03 Marek Polacek <polacek@redhat.com>
3983
3984 PR c/79758
3985 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3986 current_function_prototype_arg_types is error_mark_node. Fix
3987 formatting. Use TREE_VALUE instead of TREE_TYPE.
3988
883c8f06
JJ
39892017-03-03 Jakub Jelinek <jakub@redhat.com>
3990
79c9b7a8
JJ
3991 PR c/79837
3992 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3993 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3994 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3995 diagnostics.
3996
883c8f06
JJ
3997 PR c/79836
3998 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3999 instead of %<_Generic>.
4000 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4001 (c_parser_omp_target_exit_data): Use %<release%> instead of
4002 %<release>.
4003
324ff1a0
JJ
40042017-02-28 Jakub Jelinek <jakub@redhat.com>
4005
4006 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4007 instead of just cond ? "..." : "...".
4008 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4009 for "enter"/"exit" keyword.
4010 (c_finish_oacc_routine): Don't use %s to supply portions of the
4011 message.
4012
4227c9ad
JJ
40132017-02-24 Jakub Jelinek <jakub@redhat.com>
4014
4015 PR c++/79588
4016 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4017 handle -Wrestrict here.
4018 * c-typeck.c (build_function_call_vec): Adjust
4019 check_function_arguments caller.
4020
5d972e66
RB
40212017-02-23 Richard Biener <rguenther@suse.de>
4022
4023 PR c/79684
4024 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4025 to initialize c_exprs to return.
4026 (c_parser_gimple_binary_expression): Likewise.
4027 (c_parser_gimple_unary_expression): Likewise.
4028 (c_parser_gimple_postfix_expression): Likewise.
4029
61ac5ebe
MP
40302017-02-22 Marek Polacek <polacek@redhat.com>
4031
4032 PR c/79662
4033 * c-typeck.c (convert_arguments): Handle error_mark_node.
4034
41d1b0b1
PK
40352017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4036
4037 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4038 value of c_parser_parse_ssa_name against error_mark_node and emit
4039 error if ssa name is anonymous and written as default definition.
4040
eab1f169
PK
40412017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4042
4043 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4044 FMA_EXPR.
4045
bcac0b4d
JJ
40462017-02-16 Jakub Jelinek <jakub@redhat.com>
4047
4048 PR c++/79512
4049 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4050 ignore #pragma omp target even when not followed by identifier.
4051
1be33173
PK
40522017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4053
4054 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4055 (c_parser_gimple_unary_expression): Likewise.
4056
aa326bfb
JJ
40572017-02-13 Jakub Jelinek <jakub@redhat.com>
4058
4059 * c-parser.c (c_parser_oacc_declare): Add missing space in
4060 diagnostics.
4061
8a398bc5
PK
40622017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4063
4064 PR c/79478
4065 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4066 set_c_expr_source_range when parsing ssa-name.
4067
3dcde5ef 40682017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4069 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4070
4071 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4072 building IL when arguments are error_mark_node.
4073 (c_parser_gimple_unary_expression): Likewise.
4074 (c_parser_gimple_if_stmt): Likewise.
4075 (c_parser_gimple_switch_stmt): Likewise.
4076 (c_parser_gimple_return_stmt): Likewise.
4077 (c_parser_parse_ssa_name): When name lookup fails do not build
4078 an SSA name. Use undeclared rather than not declared in error
4079 reporting.
4080
192b048b
MP
40812017-02-09 Marek Polacek <polacek@redhat.com>
4082
4083 PR c/79428
4084 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4085 instead of c_parser_skip_until_found.
4086
56f71478
JJ
40872017-02-09 Jakub Jelinek <jakub@redhat.com>
4088
4089 PR c/79431
4090 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4091 symtab_node::get on automatic variables.
4092
02889d23
CLT
40932016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4094 Chung-Lin Tang <cltang@codesourcery.com>
4095
4096 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4097 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4098 semantic checking.
4099 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4100
7af4b20d
RB
41012017-02-07 Richard Biener <rguenther@suse.de>
4102
4103 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4104 (c_parser_gimple_postfix_expression_after_primary):
4105 Do not use c_build_function_call_vec to avoid folding and promotion.
4106 Simplify.
4107
e5e391d6
MO
41082017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4109
4110 PR lto/79061
4111 * c-decl.c (pop_scope): Pass main_input_filename to
4112 build_translation_unit_decl.
4113
c2e84327
DM
41142017-01-24 David Malcolm <dmalcolm@redhat.com>
4115
4116 * c-parser.c: Include "read-rtl-function.h" and
4117 "run-rtl-passes.h".
4118 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4119 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4120 production. Update for renaming of field "gimple_pass" to
4121 "gimple_or_rtl_pass". If __RTL was seen, call
4122 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4123 to an auto_timevar, to cope with early exit.
4124 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4125 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4126 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4127 Handle RID_RTL.
4128 (c_parser_parse_rtl_body): New function.
4129 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4130 (struct c_declspecs): Rename field "gimple_pass" to
4131 "gimple_or_rtl_pass". Add field "rtl_p".
4132 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4133 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4134 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4135 (c_parser_gimple_or_rtl_pass_list): ...this.
4136
2ebd93e1
MP
41372017-01-20 Marek Polacek <polacek@redhat.com>
4138
4139 PR c/64279
4140 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4141
b1c95bb5
RB
41422017-01-13 Richard Biener <rguenther@suse.de>
4143
4144 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4145 nops.
4146
25329913
RB
41472017-01-13 Richard Biener <rguenther@suse.de>
4148
4149 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4150 _Literal ( type-name ) number.
4151
6bb4ea5c
RB
41522017-01-12 Richard Biener <rguenther@suse.de>
4153
4154 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4155 __MEM.
4156
6b5b4e9c
JJ
41572017-01-11 Jakub Jelinek <jakub@redhat.com>
4158
4159 PR c++/72813
4160 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4161 PCH file.
4162
e3252775
RB
41632017-01-11 Richard Biener <rguenther@suse.de>
4164
4165 PR bootstrap/79052
4166 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4167 returns on parse errors.
4168
a9342885
MP
41692017-01-04 Marek Polacek <polacek@redhat.com>
4170
4171 PR c++/64767
4172 * c-parser.c (c_parser_postfix_expression): Mark zero character
4173 constants by setting original_type in c_expr.
4174 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4175 with a zero character constant.
4176 (char_type_p): New function.
4177
5dd9a9d0
DM
41782017-01-04 David Malcolm <dmalcolm@redhat.com>
4179
4180 * c-parser.c (c_parser_declaration_or_fndef): Create a
4181 rich_location at init_loc and parse it to start_init.
4182 (last_init_list_comma): New global.
4183 (c_parser_braced_init): Update last_init_list_comma when parsing
4184 commas. Pass it to pop_init_level. Pass location of closing
4185 brace to pop_init_level.
4186 (c_parser_postfix_expression_after_paren_type): Create a
4187 rich_location at type_loc and parse it to start_init.
4188 (c_parser_omp_declare_reduction): Likewise for loc.
4189 * c-tree.h (start_init): Add rich_location * param.
4190 (pop_init_level): Add location_t param.
4191 * c-typeck.c (struct initializer_stack): Add field
4192 "missing_brace_richloc".
4193 (start_init): Add richloc param, use it to initialize
4194 the stack node's missing_brace_richloc.
4195 (last_init_list_comma): New decl.
4196 (finish_implicit_inits): Pass last_init_list_comma to
4197 pop_init_level.
4198 (push_init_level): When finding missing open braces, add fix-it
4199 hints to the richloc.
4200 (pop_init_level): Add "insert_before" param and pass it
4201 when calling pop_init_level. Add fixits about missing
4202 close braces to any richloc. Use the richloc for the
4203 -Wmissing-braces warning.
4204 (set_designator): Pass last_init_list_comma to pop_init_level.
4205 (process_init_element): Likewise.
4206
cbe34bb5
JJ
42072017-01-01 Jakub Jelinek <jakub@redhat.com>
4208
4209 Update copyright years.
4210
d17680f3
JJ
42112016-12-21 Jakub Jelinek <jakub@redhat.com>
4212
0dba7960
JJ
4213 PR bootstrap/78817
4214 * c-typeck.c (build_function_call_vec): If check_function_arguments
4215 returns true, set TREE_NO_WARNING on CALL_EXPR.
4216
d17680f3
JJ
4217 PR c/77767
4218 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4219 to *expr instead of overwriting it.
4220
aa90531e
RB
42212016-12-20 Richard Biener <rguenther@suse.de>
4222
4223 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4224 error recovery.
4225 (c_parser_gimple_statement): Only build assigns for non-error
4226 stmts.
4227 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4228
629b3d75
MJ
42292016-12-14 Martin Jambor <mjambor@suse.cz>
4230
4231 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4232 omp-low.h.
4233 (c_finish_oacc_routine): Adjusted call to
4234 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4235 to use their new names.
4236 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4237 use its new name.
4238 (c_parser_oacc_update): Likewise.
4239 (c_parser_omp_simd): Likewise.
4240 (c_parser_omp_target_update): Likewise.
4241 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4242 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4243 name.
4244 (c_finish_omp_cancellation_point): Likewise.
4245 * gimple-parser.c: Do not include omp-low.h
4246
c5af52eb
CP
42472016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4248 James Norris <jnorris@codesourcery.com>
4249
4250 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4251 EXIT_DATA,WAIT} are not used in compound statements.
4252 (c_parser_oacc_enter_exit_data): Update diagnostics.
4253
48330c93
BE
42542016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4255
4256 PR c++/71973
4257 * c-decl.c (diagnose_mismatched_decls): Use
4258 OPT_Wbuiltin_declaration_mismatch here too.
4259
899ca90e 42602016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4261 Alan Hayward <alan.hayward@arm.com>
4262 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4263
4264 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4265 (make_label, finish_struct): Likewise.
4266
1ee62b92 42672016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4268 Richard Biener <rguenther@suse.de>
22b15758 4269
8e745a17
JJ
4270 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4271 * config-lang.in (gtfiles): Add c/c-parser.h.
4272 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4273 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4274 * c-parser.c (enum c_id_kind, struct c_token,
4275 c_parser_next_token_is, c_parser_next_token_is_not,
4276 c_parser_next_token_is_keyword,
4277 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4278 Split out to ...
4279 * c-parser.h: ... new header.
4280 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4281 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4282 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4283 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4284 c_parser_error, c_parser_require, c_parser_skip_until_found,
4285 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4286 c_parser_type_name): Export.
4287 (c_parser_tokens_buf): New function.
4288 (c_parser_error): Likewise.
4289 (c_parser_set_error): Likewise.
4290 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4291 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4292 via c_parser_parse_gimple_body.
8e745a17
JJ
4293 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4294 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4295 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4296 c_parser_error, c_parser_require, c_parser_skip_until_found,
4297 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4298 c_parser_type_name): Declare.
1ee62b92
PG
4299 (struct c_parser): Declare forward.
4300 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4301 (c_parser_error): Likewise.
4302 (c_parser_set_error): Likewise.
4303 * gimple-parser.c: New file.
4304 * gimple-parser.h: Likewise.
1ee62b92 4305
22b15758
UB
43062016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4307
4308 PR c/35503
4309 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4310 warn_for_restrict.
4311
84ff4775
LCW
43122016-09-11 Le-Chun Wu <lcwu@google.com>
4313 Mark Wielaard <mjw@redhat.com>
4314
4315 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4316 to the given -Wshadow= variant.
4317
4d0cdd0c
TP
43182016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4319
4320 * c-typeck.c: Include memmodel.h.
4321
1202f33e
JJ
43222016-10-13 Jakub Jelinek <jakub@redhat.com>
4323
4324 PR target/77957
4325 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4326 instead of lhd_return_null_tree_v.
4327
8a14afd0
BS
43282016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4329
4330 PR c++/69733
4331 * c-decl.c (smallest_type_quals_location): New static function.
4332 (grokdeclarator): Try to find the correct location for an ignored
4333 qualifier.
4334
81fea426
MP
43352016-09-26 Marek Polacek <polacek@redhat.com>
4336
4337 PR c/7652
4338 * c-decl.c (pop_scope): Add gcc_fallthrough.
4339
43402016-09-26 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/7652
4343 * c-parser.c (struct c_token): Add flags field.
4344 (c_lex_one_token): Pass it to c_lex_with_flags.
4345 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4346 into IFN_FALLTHROUGH.
4347 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4348 attribute fallthrough after a case label or default label.
4349 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4350
9a2300e9
MP
43512016-09-24 Marek Polacek <polacek@redhat.com>
4352
4353 PR c/77490
4354 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4355 have boolean value. Warn about ++/-- on booleans.
4356
7de76362
JJ
43572016-09-23 Jakub Jelinek <jakub@redhat.com>
4358
4359 * c-parser.c (incomplete_record_decls): Remove unnecessary
4360 = vNULL initialization of file scope vec.
4361
5b73d2ab
MP
43622016-09-16 Marek Polacek <polacek@redhat.com>
4363
4364 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4365
e51fbec3
MP
43662016-09-14 Marek Polacek <polacek@redhat.com>
4367
4368 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4369 (fix_array_notation_expr): Likewise.
4370 * c-decl.c (finish_decl): Likewise.
4371 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4372 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4373 (function_to_pointer_conversion): Use false instead of 0.
4374 (convert_lvalue_to_rvalue): Likewise.
4375 (parser_build_unary_op): Likewise.
4376 (build_atomic_assign): Likewise.
4377 (build_unary_op): Change nonconvert parameter type to bool, use
4378 true/false instead of 1/0.
4379 (build_binary_op): Use true instead of 1.
4380
254830ba
DM
43812016-09-13 David Malcolm <dmalcolm@redhat.com>
4382
4383 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4384 of add_fixit_insert to add_fixit_insert_before.
4385
4c13ba17
MP
43862016-09-13 Marek Polacek <polacek@redhat.com>
4387
4388 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4389 it.
4390
54dcdb88
BE
43912016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4392
4393 PR c++/77496
4394 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4395 COMPOUND_EXPR to warn_for_omitted_condop.
4396
e5106e27
DM
43972016-09-07 David Malcolm <dmalcolm@redhat.com>
4398
4399 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4400 c_get_substring_location for this new langhook.
4401
9dc5773f
JJ
44022016-09-02 Jakub Jelinek <jakub@redhat.com>
4403
4404 PR c/65467
4405 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4406 flag_openmp.
4407 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4408 instead of mark_exp_read on low_bound/length expression.
4409 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4410 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4411 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4412 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4413 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4414 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4415 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4416 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4417 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4418 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4419 instead of mark_expr_read.
4420 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4421 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4422 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4423 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4424 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4425 array section bases outside of depend clause, for depend clause
4426 use convert_lvalue_to_rvalue on the base.
4427 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4428 linear, aligned, map, to and from clauses.
4429 (c_omp_clause_copy_ctor): New function.
4430
295844f6
MP
44312016-09-01 Marek Polacek <polacek@redhat.com>
4432
4433 PR c/7652
4434 * c-typeck.c (composite_type): Add FALLTHRU comment.
4435
089af25c
DM
44362016-08-31 David Malcolm <dmalcolm@redhat.com>
4437
4438 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4439 to the insertion fixits for "struct", "union", and "enum".
4440
f9087798
DM
44412016-08-30 David Malcolm <dmalcolm@redhat.com>
4442
4443 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4444 rather than add_fixit_misspelled_id.
4445 (undeclared_variable): Likewise.
4446 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4447 now-redundant "here" params from add_fixit_insert method calls.
4448 (c_parser_parameter_declaration): Likewise.
4449 * c-typeck.c (build_component_ref): Remove now-redundant range
4450 param from add_fixit_replace method calls.
4451
ebef225f
MP
44522016-08-25 Marek Polacek <polacek@redhat.com>
4453
4454 * c-typeck.c (parser_build_binary_op): Pass LHS to
4455 warn_logical_not_parentheses.
4456
fe377a48
MP
44572016-08-25 Marek Polacek <polacek@redhat.com>
4458
4459 PR c/77323
4460 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4461 or _FloatN or _FloatNx is not supported.
4462 (finish_declspecs): Set type to integer_type_node when _FloatN or
4463 _FloatNx is not supported.
4464
c65699ef
JM
44652016-08-19 Joseph Myers <joseph@codesourcery.com>
4466
4467 PR c/32187
4468 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4469 (struct c_declspecs): Add field floatn_nx_idx.
4470 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4471 and _FloatNx type specifiers.
4472 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4473 (c_parser_declspecs, c_parser_attribute_any_word)
4474 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4475 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4476 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4477 narrower than double.
4478
2f1364c2
JJ
44792016-08-12 Jakub Jelinek <jakub@redhat.com>
4480 Martin Liska <mliska@suse.cz>
4481
4482 PR c/67410
4483 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4484 % to determine val element to change. Assert that
4485 wchar_bytes * charwidth fits into val array.
4486
191816a3
MP
44872016-08-12 Marek Polacek <polacek@redhat.com>
4488
4489 PR c/7652
4490 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4491 (c_parser_postfix_expression): Likewise.
4492 * c-typeck.c (build_unary_op): Adjust fall through comment.
4493 (c_mark_addressable): Likewise.
4494
b95a64bb
JJ
44952016-08-11 Jakub Jelinek <jakub@redhat.com>
4496
4497 PR c/72816
4498 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4499 array member through typedef, for orig_qual_indirect == 0 clear
4500 orig_qual_type.
4501
895aa8e1
DM
45022016-08-08 David Malcolm <dmalcolm@redhat.com>
4503
4504 PR c/64955
4505 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4506 this up to selftest::run_c_tests.
4507 (selftest::run_c_tests): New function.
4508
0b212d8c
TS
45092016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4510
ae9281fc
TS
4511 * c-parser.c (struct oacc_routine_data): Add error_seen and
4512 fndecl_seen members.
4513 (c_finish_oacc_routine): Use these.
4514 (c_parser_declaration_or_fndef): Adjust.
4515 (c_parser_oacc_routine): Likewise. Support more C language
4516 constructs, and improve diagnostics. Move pragma context
4517 checking...
4518 (c_parser_pragma): ... here.
4519
0b212d8c
TS
4520 * c-parser.c (struct oacc_routine_data): New.
4521 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4522 Simplify code.
4523 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4524 declare target" attribute.
4525
76e2c821
JB
45262016-08-01 Jan Beulich <jbeulich@suse.com>
4527
4528 * c-fold.c (c_fully_fold_internal): Also emit shift count
4529 warnings for vector types.
4530 * c-typeck.c (build_binary_op): Likewise.
4531
f618a472
MP
45322016-07-29 Marek Polacek <polacek@redhat.com>
4533
4534 PR c/71742
4535 * c-decl.c (finish_struct): Rephrase an error message.
4536
efd0786f
MP
4537 PR c/71853
4538 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4539 to error node for invalid code.
4540
e00dceaf
MP
4541 PR c/71573
4542 * c-decl.c (implicitly_declare): Return decl early not only for
4543 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4544
673a107a
JJ
45452016-07-29 Jakub Jelinek <jakub@redhat.com>
4546
4547 PR c/71969
4548 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4549 on GNU extern inline functions.
4550
a5b5c8b6
MP
45512016-07-29 Marek Polacek <polacek@redhat.com>
4552
4553 PR c/71583
4554 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4555 check expr.value.
4556
e3fe09c1
UB
45572016-07-22 Uros Bizjak <ubizjak@gmail.com>
4558
4559 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4560
7c8f7eaa
DM
45612016-07-20 David Malcolm <dmalcolm@redhat.com>
4562
4563 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4564 spellcheck-tree.h
4565 (best_macro_match): Likewise, converting from a typedef to a
4566 subclass.
4567 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4568 (lookup_name_fuzzy): Update for change of best_macro_match to a
4569 subclass with a ctor that calls cpp_forall_identifiers.
4570
de6a69ee
DM
45712016-07-20 David Malcolm <dmalcolm@redhat.com>
4572
4573 * c-decl.c (implicit_decl_warning): Update for conversion of
4574 return type of lookup_name_fuzzy to const char *.
4575 (undeclared_variable): Likewise.
4576 (lookup_name_fuzzy): Convert return type from tree to
4577 const char *.
4578 * c-parser.c (c_parser_declaration_or_fndef): Update for
4579 conversion of return type of lookup_name_fuzzy to const char *.
4580 (c_parser_parameter_declaration): Likewise.
4581
b1c9c068
CP
45822016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4583
4584 * c-parser.c (c_parser_oacc_declare): Don't scan for
4585 GOMP_MAP_POINTER.
4586 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4587 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4588 zero-length subarrays.
4589
ddbbcb19
JJ
45902016-07-15 Jakub Jelinek <jakub@redhat.com>
4591
4592 PR c/71858
4593 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4594 instead of FUZZY_LOOKUP_NAME.
4595 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4596 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4597
dd36b877
JJ
45982016-07-14 Jakub Jelinek <jakub@redhat.com>
4599
4600 PR c/71858
4601 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4602
8c681247
TS
46032016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4604
4605 * c-parser.c (c_parser_generic_selection): Make type of variable
4606 auto_vec.
4607 (c_parser_omp_declare_simd): Likewise.
4608
bf4fa671
TS
46092016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4610
4611 * c-decl.c (struct c_struct_parse_info): Change member types
4612 from vec to auto_vec.
4613 (start_struct): Adjust.
4614 (finish_struct): Likewise.
4615
557e8c49
JJ
46162016-07-02 Jakub Jelinek <jakub@redhat.com>
4617
4618 PR c/71719
4619 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4620
54d19c3b
TS
46212016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4622
4623 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4624 Move pragma context checking into...
4625 (c_parser_omp_cancellation_point): ... here, and improve
4626 diagnostic messages.
4627 * c-typeck.c (c_finish_omp_cancel)
4628 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4629
152ef731
JJ
46302016-06-29 Jakub Jelinek <jakub@redhat.com>
4631
4632 PR c/71685
4633 * c-typeck.c (c_build_qualified_type): Don't clear
4634 C_TYPE_INCOMPLETE_VARS for the main variant.
4635
46362016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4637
4638 PR c/71552
4639 * c-typeck.c (output_init_element): Diagnose incompatible types
4640 before non-constant initializers.
4641
e9ac1f86
JJ
46422016-06-28 Jakub Jelinek <jakub@redhat.com>
4643
4644 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4645
277d7ee0
AK
46462016-06-23 Andi Kleen <ak@linux.intel.com>
4647
4648 * Make-lang.in: Add support for autofdo.
4649
1a4f11c8
DM
46502016-06-22 David Malcolm <dmalcolm@redhat.com>
4651
4652 PR c/70339
4653 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4654 (implicit_decl_warning): When issuing warnings for implicit
4655 declarations, attempt to provide a suggestion via
4656 lookup_name_fuzzy.
4657 (undeclared_variable): Likewise when issuing errors.
4658 (lookup_name_in_scope): Likewise.
4659 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4660 (best_macro_match): New typedef.
4661 (find_closest_macro_cpp_cb): New function.
4662 (lookup_name_fuzzy): New function.
4663 * c-parser.c: Include gcc-rich-location.h.
4664 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4665 (c_keyword_starts_typename): ...this new function.
4666 (c_parser_declaration_or_fndef): When issuing errors about
4667 missing "struct" etc, add a fixit. For other kinds of errors,
4668 attempt to provide a suggestion via lookup_name_fuzzy.
4669 (c_parser_parms_declarator): When looking ahead to detect typos in
4670 type names, also reject CPP_KEYWORD.
4671 (c_parser_parameter_declaration): When issuing errors about
4672 unknown type names, attempt to provide a suggestion via
4673 lookup_name_fuzzy.
4674 * c-tree.h (c_keyword_starts_typename): New prototype.
4675
5a578671
JM
46762016-06-20 Joseph Myers <joseph@codesourcery.com>
4677
4678 PR c/71601
4679 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4680 c_common_type returns error_mark_node.
4681
3f8257db 46822016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4683
4684 PR c/69507
4685 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4686 __alignof__ (expression).
4687
6a3f203c
DM
46882016-06-14 David Malcolm <dmalcolm@redhat.com>
4689
4690 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4691
264757fb
DM
46922016-06-14 David Malcolm <dmalcolm@redhat.com>
4693
4694 * c-typeck.c (build_component_ref): Simplify fixit code by
4695 using gcc_rich_location::add_fixit_misspelled_id.
4696 (set_init_label): Likewise.
4697
f7e4f2e3
DM
46982016-06-13 David Malcolm <dmalcolm@redhat.com>
4699
4700 * c-parser.c (c_parser_initelt): Provide location of name for new
4701 location_t param of set_init_label.
4702 * c-tree.h (set_init_label): Add location_t param.
4703 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4704 param and use it when issuing error messages about unrecognized
4705 field names. Attempt to provide a fixit hint if appropriate,
4706 otherwise update the error message to provide the type name.
4707
4b1ffdb1
TS
47082016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4709
4710 PR c/71381
4711 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4712 Loosen checking.
4713
44a845ca
MS
47142016-06-08 Martin Sebor <msebor@redhat.com>
4715 Jakub Jelinek <jakub@redhat.com>
4716
4717 PR c++/70507
4718 PR c/68120
4719 * c-typeck.c (convert_arguments): Don't promote last argument
4720 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4721
92a5f2ba
MP
47222016-06-08 Marek Polacek <polacek@redhat.com>
4723
4724 PR c/71418
4725 * c-decl.c (grokdeclarator): Check TYPE_P.
4726
08203f73
MP
4727 PR c/71426
4728 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4729 code.
4730
6ffd47b7
DM
47312016-06-07 David Malcolm <dmalcolm@redhat.com>
4732
4733 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4734 and structure element reference, capture the location of the
4735 element name token and pass it to build_component_ref.
4736 (c_parser_postfix_expression_after_primary): Likewise for
4737 structure element dereference.
4738 (c_parser_omp_variable_list): Likewise for
4739 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4740 * c-tree.h (build_component_ref): Add location_t param.
4741 * c-typeck.c (build_component_ref): Add location_t param
4742 COMPONENT_LOC. Use it, if available, when issuing hints about
4743 mispelled member names to provide a fixit replacement hint.
4744
1f40cff3
MP
47452016-06-06 Marek Polacek <polacek@redhat.com>
4746
4747 PR c/71362
4748 * c-parser.c (c_parser_direct_declarator): Set location.
4749
5545a907
MP
47502016-06-06 Marek Polacek <polacek@redhat.com>
4751
4752 * c-typeck.c (comptypes_internal): Handle comparisons of
4753 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4754 TYPE_REF_CAN_ALIAS_ALL.
4755
b605f663
CLT
47562016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4757
4758 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4759 arguments as addressable when async clause exists.
4760
00631022
JJ
47612016-05-30 Jakub Jelinek <jakub@redhat.com>
4762
4763 PR c++/71349
4764 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4765 when combined with target construct.
4766
7211a097
JJ
47672016-05-26 Jakub Jelinek <jakub@redhat.com>
4768
4769 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4770 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4771
95efe6b6
MP
47722016-05-25 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/71265
4775 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4776
a23faf7a
MP
4777 PR c/71266
4778 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4779
e46c7770
CP
47802016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4781
4782 * c-parser.c (c_parser_oacc_declare): Add support for
4783 GOMP_MAP_FIRSTPRIVATE_POINTER.
4784 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4785 argument with enum c_omp_region_type ort.
4786 (handle_omp_array_sections): Likewise. Update call to
4787 handle_omp_array_sections_1.
4788 (c_finish_omp_clauses): Add specific errors and warning messages for
4789 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4790 call to handle_omp_array_sections.
4791
a04e69c0
TS
47922016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4793
4794 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4795
f17a223d
RB
47962016-05-24 Richard Biener <rguenther@suse.de>
4797
4798 PR middle-end/70434
4799 PR c/69504
4800 * c-typeck.c (build_array_ref): Do not complain about indexing
4801 non-lvalue vectors. Adjust for function name change.
4802
79063edd
MS
48032016-05-20 Martin Sebor <msebor@redhat.com>
4804
4805 PR c/71115
4806 * c-typeck.c (error_init): Use
4807 expansion_point_location_if_in_system_header.
4808 (warning_init): Same.
4809
8a40fef3
DM
48102016-05-19 David Malcolm <dmalcolm@redhat.com>
4811
4812 PR c/71171
4813 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4814 in error-handling.
4815 (c_parser_postfix_expression): Likewise.
4816 * c-tree.h (c_expr::set_error): New method.
4817 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4818 that result's range is initialized.
4819
e9892350
JG
48202016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4821
4822 * c-typeck.c (parser_build_unary_op): Fix formatting.
4823
8fad45f5
MW
48242016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4825
4826 * c-decl.c (grokdeclarator): Remove errmsg and use of
4827 targetm.invalid_return_type.
4828 (grokparms): Remove errmsg and use of
4829 targetm.invalid_parameter_type.
4830
aa4b467b
JM
48312016-05-13 Joseph Myers <joseph@codesourcery.com>
4832
4833 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4834 function return type.
4835
4f2e1536
MP
48362016-05-12 Marek Polacek <polacek@redhat.com>
4837
4838 PR c/70756
4839 * c-decl.c (build_compound_literal): Pass LOC down to
4840 c_incomplete_type_error.
4841 * c-tree.h (require_complete_type): Adjust declaration.
4842 (c_incomplete_type_error): Likewise.
4843 * c-typeck.c (require_complete_type): Add location parameter, pass it
4844 down to c_incomplete_type_error.
4845 (c_incomplete_type_error): Add location parameter, pass it down to
4846 error_at.
4847 (build_component_ref): Pass location down to c_incomplete_type_error.
4848 (default_conversion): Pass location down to require_complete_type.
4849 (build_array_ref): Likewise.
4850 (build_function_call_vec): Likewise.
4851 (convert_arguments): Likewise.
4852 (build_unary_op): Likewise.
4853 (build_c_cast): Likewise.
4854 (build_modify_expr): Likewise.
4855 (convert_for_assignment): Likewise.
4856 (c_finish_omp_clauses): Likewise.
4857
d6e83a8d
MM
48582016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4859
4860 PR c/43651
4861 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4862 is enabled.
4863 * c-errors.c (pedwarn_c90): Return true if warned.
4864 * c-tree.h (pedwarn_c90): Change return type to bool.
4865 (enum c_declspec_word): Add new enumerator cdw_atomic.
4866
5c3a10fb
MP
48672016-05-11 Marek Polacek <polacek@redhat.com>
4868
4869 PR c++/71024
4870 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4871 diagnose_mismatched_attributes and call it.
4872
cf68d92c
MP
48732016-05-10 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/70255
4876 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4877 on a declaration following the definition.
4878
351f85c5
JJ
48792016-05-05 Jakub Jelinek <jakub@redhat.com>
4880
4881 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4882 parse it through to c_parser_c99_block_statement.
4883 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4884 caller.
4885
deef7113
MP
48862016-05-04 Marek Polacek <polacek@redhat.com>
4887
4888 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4889 OPT_Wdangling_else.
4890
de55efd5
MP
48912016-05-04 Marek Polacek <polacek@redhat.com>
4892
4893 PR c/48778
4894 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4895 for macro expansions.
4896
79ce98bc
MP
48972016-05-03 Marek Polacek <polacek@redhat.com>
4898
4899 PR c/70859
4900 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4901 check_builtin_function_arguments.
4902
fb2647aa
RB
49032016-05-03 Richard Biener <rguenther@suse.de>
4904
4905 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4906 the checksum from the previous stage.
4907
77886428
CP
49082016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4909
4910 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4911 c_finish_omp_clauses.
4912 (c_parser_omp_all_clauses): Likewise.
4913 (c_parser_oacc_cache): Likewise.
4914 (c_parser_oacc_loop): Likewise.
4915 (omp_split_clauses): Likewise.
4916 (c_parser_omp_declare_target): Likewise.
4917 (c_parser_cilk_all_clauses): Likewise.
4918 (c_parser_cilk_for): Likewise.
4919 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4920 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4921
7176a4a0
MP
49222016-05-02 Marek Polacek <polacek@redhat.com>
4923
4924 PR c/70851
4925 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4926 incomplete type.
4927
e7ff0319
CP
49282016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4929
4930 PR middle-end/70626
4931 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4932 OACC_LOOP_CLAUSE_MASK.
4933 (c_parser_oacc_kernels_parallel): Update call to
4934 c_oacc_split_loop_clauses.
4935
9f405ce1
AM
49362016-04-28 Andrew MacLeod <amacleod@redhat.com>
4937
4938 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4939 argument to build_modify_expr in two cases.
4940
c1e1f433
BS
49412016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4942
4943 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4944 warn_for_memset instead of warning directly here.
4945
2448a956
MP
49462016-04-26 Marek Polacek <polacek@redhat.com>
4947
4948 PR c/67784
4949 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4950 out of ...
4951 (c_parser_for_statement): ... here.
4952 (c_parser_if_statement): Use it.
4953 (c_parser_switch_statement): Use it.
4954 (c_parser_while_statement): Use it.
4955
b02a5e26
MP
4956 PR c/70791
4957 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4958
477d4906
IV
49592016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4960
4961 PR c++/69363
4962 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4963 instead of c_finish_cilk_clauses.
4964 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4965 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4966 floating-point variables in the linear clause for Cilk Plus.
4967
fe37c7af
MM
49682016-04-18 Michael Matz <matz@suse.de>
4969
4970 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4971 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4972
949505a9
MP
49732016-04-15 Marek Polacek <polacek@redhat.com>
4974
4975 PR c/70671
4976 * c-typeck.c (build_unary_op): Pass location down to error and
4977 warning call.
4978
dda1bf61
JJ
49792016-04-15 Jakub Jelinek <jakub@redhat.com>
4980
4981 PR c/70436
4982 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4983 where needed.
4984 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4985 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4986 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4987 Adjust c_parser_pragma callers.
4988 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4989 caller.
4990 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4991 c_parser_statement.
4992 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4993 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4994 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4995 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4996 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4997 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4998 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4999 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5000 down where needed.
5001 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5002 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5003 calls.
5004
99cd9857
MP
50052016-04-13 Marek Polacek <polacek@redhat.com>
5006
5007 PR c/70436
5008 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5009 adjust callers.
5010 (c_parser_statement): Likewise.
5011 (c_parser_c99_block_statement): Likewise.
5012 (c_parser_while_statement): Likewise.
5013 (c_parser_for_statement): Likewise.
5014 (c_parser_if_body): Don't set IF_P here.
5015 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5016 about dangling else here.
5017 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5018 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5019 warn about dangling else here.
5020
f13355da
MP
50212016-04-04 Marek Polacek <polacek@redhat.com>
5022
5023 PR c/70307
5024 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5025
5fde6a45
MP
50262016-03-31 Marek Polacek <polacek@redhat.com>
5027
5028 PR c/70297
5029 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5030
4bbf545b
DM
50312016-03-18 David Malcolm <dmalcolm@redhat.com>
5032
5033 PR c/70281
5034 * c-parser.c (c_parser_postfix_expression): Set the source range
5035 for uses of "__builtin_types_compatible_p".
5036
fcc2b74f
JJ
50372016-03-17 Jakub Jelinek <jakub@redhat.com>
5038
5039 PR c/70280
5040 * c-typeck.c (composite_type): Don't count void_list_node
5041 into len, if the list is terminated by void_list_node, start
5042 with void_list_node instead of NULL for newargs. Stop
5043 at void_list_node.
5044
ab4c578f
MP
50452016-03-16 Marek Polacek <polacek@redhat.com>
5046
5047 PR c/70093
5048 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5049 nested functions returning VM types.
5050
96b3c82d
CP
50512016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5052
5053 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5054 when calling c_finish_omp_clauses.
5055
29b9828f
BS
50562016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5057
5058 PR c/69824
5059 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5060 for later.
5061
7ff6ca38
MP
50622016-03-04 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/69798
5065 * c-parser.c (c_parser_postfix_expression): Call
5066 c_parser_cast_expression rather than c_parser_postfix_expression.
5067
686e2237
JJ
50682016-03-01 Jakub Jelinek <jakub@redhat.com>
5069
5070 PR c/69796
5071 PR c/69974
5072 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5073 of incomplete decls to error_mark_node.
5074
0b05329b
MP
50752016-02-24 Marek Polacek <polacek@redhat.com>
5076
5077 PR c/69819
5078 * c-decl.c (finish_decl): Don't update the copy of the type of a
5079 different decl type.
5080
067fbd8b
JJ
50812016-02-23 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR objc/69844
5084 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5085 in id_kind reclassification.
5086
bf14eba2
JJ
50872016-02-16 Jakub Jelinek <jakub@redhat.com>
5088
5089 PR c/69835
5090 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5091
ba539195
JN
50922016-02-16 James Norris <jnorris@codesourcery.com>
5093
5094 PR c/64748
5095 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5096
16595a1f
BS
50972016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5098
f48dfe98
BS
5099 * c-decl.c (build_null_declspecs): Zero the entire struct.
5100
16595a1f
BS
5101 PR c/69522
5102 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5103 callers changed. If nested_p is true, use it to call
5104 finish_implicit_inits.
5105 * c-tree.h (finish_implicit_inits): Declare.
5106 * c-typeck.c (finish_implicit_inits): New function. Move code
5107 from ...
5108 (push_init_level): ... here.
5109 (set_designator, process_init_element): Call finish_implicit_inits.
5110
66756373
JJ
51112016-02-11 Jakub Jelinek <jakub@redhat.com>
5112
5113 PR c/69768
5114 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5115 arguments for -Waddress warning.
5116
1066e9b5
JJ
51172016-02-04 Jakub Jelinek <jakub@redhat.com>
5118
5119 PR c/69669
5120 * c-decl.c (finish_enum): When honoring mode attribute,
5121 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5122
3a5d2ba4
JJ
51232016-01-29 Jakub Jelinek <jakub@redhat.com>
5124
5125 PR debug/69518
5126 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5127 all type variants, not just TYPE_MAIN_VARIANT.
5128
cbdd8ae0
JJ
51292016-01-27 Jakub Jelinek <jakub@redhat.com>
5130
5131 PR debug/66869
5132 * c-decl.c (c_write_global_declarations_1): Warn with
5133 warn_unused_function if static prototype without definition
5134 is not C_DECL_USED.
5135
fa74a4bc
MP
51362016-01-27 Marek Polacek <polacek@redhat.com>
5137
5138 PR c/68062
5139 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5140 to unsigned, if needed. Add -Wsign-compare warning.
5141
13f92e8d
JJ
51422016-01-26 Jakub Jelinek <jakub@redhat.com>
5143
5144 PR tree-optimization/69483
5145 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5146
cd8e73dc 51472016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5148
5149 PR c/24293
5150 * c-tree.h (incomplete_record_decls): Declare.
5151 * c-parser.c (incomplete_record_decls): Define.
5152 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5153 report error if any decl has zero size.
5154 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5155 or enum type to incomplete_record_decls.
5156
e6d6ec9e
TV
51572016-01-14 Tom de Vries <tom@codesourcery.com>
5158
5159 PR tree-optimization/68773
5160 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5161 set force_output.
5162
00083992
MP
51632016-01-14 Marek Polacek <polacek@redhat.com>
5164
5165 PR c/69262
5166 * c-decl.c (grokdeclarator): Provide more information for invalid
5167 array declarations.
5168
7443cf13
DM
51692016-01-06 David Malcolm <dmalcolm@redhat.com>
5170
5171 * c-parser.c (c_parser_unary_expression): For dereferences, build
5172 a combined location before calling build_indirect_ref, so that
5173 error reports cover the full range, manually updating the c_expr
5174 src_range.
5175
6b131d5b
MP
51762016-01-06 Marek Polacek <polacek@redhat.com>
5177
5178 PR sanitizer/69099
5179 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5180 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5181 NULL.
5182
818ab71a
JJ
51832016-01-04 Jakub Jelinek <jakub@redhat.com>
5184
5185 Update copyright years.
5186
2fe0a208
MP
51872016-01-04 Marek Polacek <polacek@redhat.com>
5188
5189 PR c/68908
5190 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5191 optimization to use __atomic_fetch_* built-in if possible.
5192
c7b48c8a
TS
51932015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5194
5195 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5196 into...
5197 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5198 all users.
5199
fda5652f
MP
52002015-12-22 Marek Polacek <polacek@redhat.com>
5201
5202 PR c/69002
5203 * c-typeck.c (build_component_ref): Warn when acessing elements of
5204 atomic structures or unions.
5205
745e411d
DM
52062015-12-21 David Malcolm <dmalcolm@redhat.com>
5207
5208 * c-typeck.c: Include "gcc-rich-location.h".
5209 (build_binary_op): In the two places that call binary_op_error,
5210 create a gcc_rich_location and populate it with the location of
5211 the binary op and its two operands.
5212
94c40e19
DM
52132015-12-16 David Malcolm <dmalcolm@redhat.com>
5214
5215 * c-parser.c (c_parser_statement_after_labels): When calling
5216 c_finish_return, Use the return expression's location if it has
5217 one, falling back to the location of the first token within it.
5218 * c-typeck.c (c_finish_return): When issuing warnings about
5219 the incorrect presence/absence of a return value, issue a note
5220 showing the declaration of the function.
5221
de67c4c3
DM
52222015-12-16 David Malcolm <dmalcolm@redhat.com>
5223
5224 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5225 to 4.
5226 (c_parser_peek_nth_token): New function.
5227 (c_parser_peek_conflict_marker): New function.
5228 (c_parser_error): Detect conflict markers and report them as such.
5229
a10704e1
DM
52302015-12-16 David Malcolm <dmalcolm@redhat.com>
5231
5232 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5233 to preserve range information for the primary expression
5234 in the call to c_parser_postfix_expression_after_primary.
5235
8062bca6
DM
52362015-12-16 David Malcolm <dmalcolm@redhat.com>
5237
5238 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5239 expression location, falling back on the first token location,
5240 rather than always using the latter.
5241
d06f8b75
MP
52422015-12-16 Marek Polacek <polacek@redhat.com>
5243
5244 PR c/64637
5245 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5246 available.
5247
2994fb91
MP
52482015-12-15 Marek Polacek <polacek@redhat.com>
5249
5250 PR c/68907
5251 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5252 artificial decl.
5253
a1b93f8d
DM
52542015-12-08 David Malcolm <dmalcolm@redhat.com>
5255
5256 * c-parser.c (c_parser_alignof_expression): Capture location of
5257 closing parenthesis (if any), or of end of unary expression, and
5258 use it to build a src_range for the expression.
5259
46c6e1e2
DM
52602015-12-08 David Malcolm <dmalcolm@redhat.com>
5261
5262 PR c/68757
5263 * c-parser.c (c_parser_get_builtin_args): Add
5264 "out_close_paren_loc" param, and write back to it.
5265 (c_parser_postfix_expression): Capture the closing
5266 parenthesis location for RID_CHOOSE_EXPR,
5267 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5268 RID_BUILTIN_SHUFFLE and use it to set the source range
5269 for such expressions; within RID_BUILTIN_COMPLEX set
5270 the underlying location.
5271
66189108
MP
52722015-12-07 Marek Polacek <polacek@redhat.com>
5273
5274 PR c/68668
5275 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5276 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5277
f187980b
EB
52782015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5279
5280 * c-tree.h (c_build_va_arg): Adjust prototype.
5281 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5282 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5283 parameter, adjust throughout and issue an error if EXPR is a component
5284 with reverse storage order.
5285
4250754e
JM
52862015-12-02 Jason Merrill <jason@redhat.com>
5287
5288 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5289 (c_fully_fold_internal, decl_constant_value_for_optimization):
5290 Move from c-common.c.
5291 * c-tree.h: Declare decl_constant_value_for_optimization.
5292 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5293
e9e32ee6
JM
52942015-12-02 Joseph Myers <joseph@codesourcery.com>
5295
5296 PR c/68162
5297 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5298 following link from declarator to next declarator. Track original
5299 qualified type and pass it to c_build_qualified_type.
5300 * c-typeck.c (c_build_qualified_type): Add arguments
5301 orig_qual_type and orig_qual_indirect.
5302
ff7a55bf
TS
53032015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5304
5305 * c-parser.c (c_parser_omp_clause_name)
5306 (c_parser_oacc_all_clauses): Alphabetical sorting.
5307
657e4e47
JJ
53082015-12-02 Jakub Jelinek <jakub@redhat.com>
5309
5310 PR c/68533
5311 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5312 for diagnostics.
5313
37d5ad46
JB
53142015-12-01 Julian Brown <julian@codesourcery.com>
5315 Cesar Philippidis <cesar@codesourcery.com>
5316 James Norris <James_Norris@mentor.com>
5317
5318 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5319 (c_parser_oacc_clause_use_device): New function.
5320 (c_parser_oacc_all_clauses): Add use_device support.
5321 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5322 (c_parser_oacc_host_data): New function.
5323 (c_parser_omp_construct): Add host_data support.
5324 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5325 * c-typeck.c (c_finish_oacc_host_data): New function.
5326 (c_finish_omp_clauses): Add use_device support.
5327
a4850ce9
JH
53282015-11-29 Jan Hubicka <hubicka@ucw.cz>
5329
5330 PR c/67106
5331 * c-decl.c: Set TYPE_PACKED in variants.
5332
b58d3df2
ML
53332015-11-27 Martin Liska <mliska@suse.cz>
5334
5335 PR c++/68312
5336 * c-array-notation.c (fix_builtin_array_notation_fn):
5337 Use release_vec_vec instead of vec::release.
5338 (build_array_notation_expr): Likewise.
5339 (fix_conditional_array_notations_1): Likewise.
5340 (fix_array_notation_expr): Likewise.
5341 (fix_array_notation_call_expr): Likewise.
5342
aec17bfe
JJ
53432015-11-27 Jakub Jelinek <jakub@redhat.com>
5344
5345 PR c/63326
5346 * c-parser.c (c_parser_compound_statement_nostart): If
5347 last_label is true, use pragma_stmt instead of pragma_compound
5348 as second c_parser_pragma argument.
5349 (c_parser_omp_ordered, c_parser_omp_target_update,
5350 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5351 false as second argument to c_parser_skip_to_pragma_eol after
5352 diagnosing standalone directives used in pragma_stmt context.
5353
688c4de0
IV
53542015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5355
5356 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5357 with "if (ENABLE_OFFLOADING)".
5358
cbd03aee
DM
53592015-11-23 David Malcolm <dmalcolm@redhat.com>
5360
5361 PR objc/68438
5362 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5363 for various Objective-C constructs: Class.name syntax,
5364 @selector(), @protocol(), @encode(), and [] message syntax.
5365
a87a86e1
DM
53662015-11-20 David Malcolm <dmalcolm@redhat.com>
5367
5368 PR 62314
5369 * c-typeck.c (should_suggest_deref_p): New function.
5370 (build_component_ref): Special-case POINTER_TYPE when
5371 generating a "not a structure of union" error message, and
5372 suggest a "->" rather than a ".", providing a fix-it hint.
5373
8ece8dfb
DM
53742015-11-19 David Malcolm <dmalcolm@redhat.com>
5375
5376 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5377 candidate into a new function, find_closest_identifier.
5378
433068cc
MP
53792015-11-19 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/68412
5382 * c-typeck.c (parser_build_binary_op): Properly handle
5383 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5384
bef08b71
DM
53852015-11-17 David Malcolm <dmalcolm@redhat.com>
5386
5387 * c-parser.c (set_c_expr_source_range): Bulletproof both
5388 overloaded implementations against NULL expr->value.
5389 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5390 values.
5391 (c_parser_unary_expression): Likewise when handling addresses of
5392 labels.
5393 (c_parser_postfix_expression): Likewise for statement expressions,
5394 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5395 __builtin_va_arg, and for __builtin_offset_of.
5396 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5397 src_range using the range of the braced initializer.
5398 (c_parser_transaction_expression): Set src_range for "ret" to a
5399 sane pair of values.
5400
fff77217
KY
54012015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5402
5403 * c-parser.c (c_finish_omp_declare_simd): Look for
5404 "simd" attribute as well. Update error message.
5405
1d899da2
TS
54062015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5407
5408 * c-parser.c (c_parser_omp_declare_target): Adjust.
5409
e4606348
JJ
54102015-11-14 Jakub Jelinek <jakub@redhat.com>
5411
5412 * c-typeck.c (c_finish_omp_clauses): Don't mark
5413 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5414
3e636daf
MP
54152015-11-14 Marek Polacek <polacek@redhat.com>
5416
5417 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5418 * c-typeck.c: Likewise.
5419
ebedc9a3
DM
54202015-11-13 David Malcolm <dmalcolm@redhat.com>
5421
5422 * c-decl.c (warn_defaults_to): Pass line_table to
5423 rich_location ctor.
5424 * c-errors.c (pedwarn_c99): Likewise.
5425 (pedwarn_c90): Likewise.
5426 * c-parser.c (set_c_expr_source_range): New functions.
5427 (c_token::get_range): New method.
5428 (c_token::get_finish): New method.
5429 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5430 based on the range from the start of the LHS to the end of the
5431 RHS.
5432 (c_parser_conditional_expression): Likewise, based on the range
5433 from the start of the cond.value to the end of exp2.value.
5434 (c_parser_binary_expression): Call set_c_expr_source_range on
5435 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5436 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5437 based on the cast_loc through to the end of the expr.
5438 (c_parser_unary_expression): Likewise, based on the
5439 op_loc through to the end of op.
5440 (c_parser_sizeof_expression) Likewise, based on the start of the
5441 sizeof token through to either the closing paren or the end of
5442 expr.
5443 (c_parser_postfix_expression): Likewise, using the token range,
5444 or from the open paren through to the close paren for
5445 parenthesized expressions.
5446 (c_parser_postfix_expression_after_primary): Likewise, for
5447 various kinds of expression.
5448 * c-tree.h (struct c_expr): Add field "src_range".
5449 (c_expr::get_start): New method.
5450 (c_expr::get_finish): New method.
5451 (set_c_expr_source_range): New decls.
5452 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5453 on ret for prefix unary ops.
5454 (parser_build_binary_op): Likewise, running from the start of
5455 arg1.value through to the end of arg2.value.
5456
ec8b536f
MP
54572015-11-13 Marek Polacek <polacek@redhat.com>
5458
5459 PR c/68320
5460 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5461
277fe616
DM
54622015-11-13 David Malcolm <dmalcolm@redhat.com>
5463
5464 * c-typeck.c: Include spellcheck.h.
5465 (lookup_field_fuzzy_find_candidates): New function.
5466 (lookup_field_fuzzy): New function.
5467 (build_component_ref): If the field was not found, try using
5468 lookup_field_fuzzy and potentially offer a suggestion.
5469
6e232ba4
JN
54702015-11-12 James Norris <jnorris@codesourcery.com>
5471 Joseph Myers <joseph@codesourcery.com>
5472
5473 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5474 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5475 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5476 and PRAGMA_OMP_CLAUSE_LINK.
5477 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5478 and PRAGMA_OACC_CLAUSE_LINK.
5479 (OACC_DECLARE_CLAUSE_MASK): New definition.
5480 (c_parser_oacc_declare): New function.
5481
9be4f715
MP
54822015-11-12 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/67784
5485 * c-parser.c (c_parser_for_statement): Reclassify the token in
5486 a correct scope.
5487
e78bede6
MP
54882015-11-11 Marek Polacek <polacek@redhat.com>
5489
5490 PR c/68107
5491 PR c++/68266
5492 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5493 checking the size of an array.
5494
69f293c9
AM
54952015-11-11 Andrew MacLeod <amacleod@redhat.com>
5496
5497 * c-array-notation.c: Remove unused header files.
5498 * c-aux-info.c: Likewise.
5499 * c-convert.c: Likewise.
5500 * c-decl.c: Likewise.
5501 * c-errors.c: Likewise.
5502 * c-lang.c: Likewise.
5503 * c-objc-common.c: Likewise.
5504 * c-parser.c: Likewise.
5505 * c-typeck.c: Likewise.
5506 * gccspec.c: Likewise.
5507
3a40d81d
NS
55082015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5509 Cesar Philippidis <cesar@codesourcery.com>
5510 James Norris <jnorris@codesourcery.com>
5511 Julian Brown <julian@codesourcery.com>
5512 Nathan Sidwell <nathan@codesourcery.com>
5513
3a40d81d
NS
5514 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5515 routine arg.
5516 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5517 (c_parser_pragma): Parse 'acc routine'.
5518 (OACC_ROUTINE_CLAUSE_MARK): Define.
5519 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5520
fc402eec
AA
55212015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5522
5523 PR debug/67192
5524 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5525 location of the backward-goto to the start of the loop body.
5526
f6b0b3db
AA
55272015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5528
5529 PR debug/67192
5530 * c-parser.c (c_parser_while_statement): Finish the loop before
5531 parsing ahead for misleading indentation.
5532 (c_parser_for_statement): Likewise.
5533
ee45a32d
EB
55342015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5535
5536 * c-decl.c (finish_struct): If the structure has reverse storage
5537 order, rewrite the type of array fields with scalar component. Call
5538 maybe_apply_pragma_scalar_storage_order on entry.
5539 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5540 errors on bit-fields and reverse SSO here and not...
5541 (c_mark_addressable): ...here.
5542 (output_init_element): Adjust call to initializer_constant_valid_p.
5543 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5544
8a645150
DM
55452015-11-06 David Malcolm <dmalcolm@redhat.com>
5546
5547 * c-decl.c (warn_defaults_to): Update for change in signature
5548 of diagnostic_set_info.
5549 * c-errors.c (pedwarn_c99): Likewise.
5550 (pedwarn_c90): Likewise.
5551 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5552 for textinfo::set_location.
5553
7a5e4956
CP
55542015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5555 Thomas Schwinge <thomas@codesourcery.com>
5556 James Norris <jnorris@codesourcery.com>
5557
5558 * c-parser.c (c_parser_omp_clause_name): Add support for
5559 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5560 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5561 default(none) in OpenACC.
5562 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5563 arguments.
5564 (c_parser_oacc_clause_tile): New function.
5565 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5566 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5567 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5568 TILE}.
5569 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5570 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5571 FIRSTPRIVATE}.
5572 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5573 (c_parser_oacc_update): Update the error message for missing clauses.
5574 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5575 and OMP_CLAUSE_INDEPENDENT.
5576
bfcfbfa0
MP
55772015-11-05 Marek Polacek <polacek@redhat.com>
5578
5579 PR c/68090
5580 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5581 deal with pre-evaluation on invalid types.
5582
e01d41e5
JJ
55832015-11-05 Jakub Jelinek <jakub@redhat.com>
5584 Ilya Verbin <ilya.verbin@intel.com>
5585
5586 * c-parser.c: Include context.h and gimple-expr.h.
5587 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5588 monotonic together with nonmonotonic.
5589 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5590 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5591 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5592 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5593 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5594 expressions on combined target teams before the target.
5595 (c_parser_omp_declare_target): If decl has "omp declare target" or
5596 "omp declare target link" attribute, and cgraph or varpool node already
5597 exists, then set corresponding flags. Call c_finish_omp_clauses
5598 in the parenthesized extended-list syntax case.
5599 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5600 declare target.
5601 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5602 on OMP_CLAUSE_REDUCTION array sections.
5603 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5604 into the constant offset, or for variable low-bound using
5605 POINTER_PLUS_EXPR. For structure element based array sections use
5606 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5607 (c_finish_omp_clauses): Drop generic_field_head, structure
5608 elements are now always mapped even as array section bases,
5609 diagnose same var in data sharing and mapping clauses. Diagnose if
5610 linear step on declare simd is neither a constant nor a uniform
5611 parameter. Look through POINTER_PLUS_EXPR for array section
5612 reductions. Diagnose the same var or function appearing multiple
5613 times on the same directive. Fix up wording for the to clause if t
5614 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5615 modifier on kinds other than dynamic or guided or nonmonotonic
5616 modifier together with ordered clause.
5617
4bf9e5a8
TS
56182015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5619 Chung-Lin Tang <cltang@codesourcery.com>
5620
5621 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5622
2adfab87
AM
56232015-10-29 Andrew MacLeod <amacleod@redhat.com>
5624
5625 * c-array-notation.c: Reorder #include's and remove duplicates.
5626 * c-aux-info.c: Likewise.
5627 * c-convert.c: Likewise.
5628 * c-decl.c: Likewise.
5629 * c-errors.c: Likewise.
5630 * c-lang.c: Likewise.
5631 * c-objc-common.c: Likewise.
5632 * c-parser.c: Likewise.
5633 * c-typeck.c: Likewise.
5634
e922069e
JW
56352015-10-26 Jim Wilson <jim.wilson@linaro.org>
5636
5637 PR debug/66068
5638 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5639 after calling build_qualified_type.
5640
765dd391
CP
56412015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5642 Thomas Schwinge <thomas@codesourcery.com>
5643 James Norris <jnorris@codesourcery.com>
5644 Joseph Myers <joseph@codesourcery.com>
5645 Julian Brown <julian@codesourcery.com>
5646 Bernd Schmidt <bschmidt@redhat.com>
5647
5648 * c-parser.c (c_parser_oacc_shape_clause): New.
5649 (c_parser_oacc_simple_clause): New.
5650 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5651 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5652
88bae6f4
TS
56532015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5654 James Norris <jnorris@codesourcery.com>
5655 Cesar Philippidis <cesar@codesourcery.com>
5656
5657 PR c/64765
5658 PR c/64880
5659 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5660 parameters, and handle these. Adjust all users.
5661 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5662 into...
5663 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5664 all users.
5665 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5666 declare functions.
5667 (c_finish_omp_construct): Declare function.
5668 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5669 Merge functions into...
5670 (c_finish_omp_construct): ... this new function.
5671
a8fc2579
RB
56722015-10-22 Richard Biener <rguenther@suse.de>
5673
5674 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5675 before folding a MINUS_EXPR.
5676
e9122ef6
MP
56772015-10-21 Marek Polacek <polacek@redhat.com>
5678
5679 PR c/68024
5680 * c-decl.c (start_function): Warn about vararg functions without
5681 a prototype.
5682
9f47c7e5
IE
56832015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5684
5685 * c-typeck.c (build_conditional_expr): Use boolean vector
5686 type for vector comparison.
5687 (build_vec_cmp): New.
5688 (build_binary_op): Use build_vec_cmp for comparison.
5689
fa60eeb9
MP
56902015-10-20 Marek Polacek <polacek@redhat.com>
5691
5692 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5693
2c7020eb
MP
56942015-10-20 Marek Polacek <polacek@redhat.com>
5695
5696 PR c/67964
5697 * c-parser.c (c_parser_attributes): Break out of the loop if the
5698 token after an attribute isn't a comma.
5699
d9a6bd32
JJ
57002015-10-13 Jakub Jelinek <jakub@redhat.com>
5701 Aldy Hernandez <aldyh@redhat.com>
5702
5703 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5704 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5705 (c_parser_omp_variable_list): Handle structure elements for
5706 map, to and from clauses. Handle array sections in reduction
5707 clause. Formatting fixes.
5708 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5709 if clause modifiers.
5710 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5711 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5712 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5713 c_parser_omp_clause_is_device_ptr): New functions.
5714 (c_parser_omp_clause_ordered): Parse optional parameter.
5715 (c_parser_omp_clause_reduction): Handle array reductions.
5716 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5717 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5718 functions.
5719 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5720 (c_parser_omp_clause_depend_sink): New function.
5721 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5722 (c_parser_omp_clause_map): Parse release/delete map kinds and
5723 optional always modifier.
5724 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5725 and c_finish_omp_clauses callers.
5726 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5727 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5728 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5729 (OMP_CRITICAL_CLAUSE_MASK): Define.
5730 (c_parser_omp_critical): Parse critical clauses.
5731 (c_parser_omp_for_loop): Handle doacross loops, adjust
5732 c_finish_omp_for and c_finish_omp_clauses callers.
5733 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5734 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5735 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5736 (c_parser_omp_for): Disallow ordered clause when combined with
5737 distribute. Disallow linear clause when combined with distribute
5738 and not combined with simd.
5739 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5740 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5741 parse clauses and if depend clause is found, don't parse a body.
5742 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5743 Allow target parallel without for after it.
5744 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5745 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5746 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5747 invalid kinds.
5748 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5749 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5750 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5751 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5752 functions.
5753 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5754 defaultmap and is_device_ptr clauses.
5755 (c_parser_omp_target): Parse target parallel and target simd. Set
5756 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5757 and target exit data. Diagnose invalid map kinds.
5758 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5759 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5760 construct.
5761 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5762 &omp_priv.
5763 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5764 (c_parser_omp_taskloop): New function.
5765 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5766 handle PRAGMA_OMP_TASKLOOP.
5767 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5768 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5769 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5770 Add IS_OMP argument, handle structure element bases, diagnose
5771 bitfields, pass IS_OMP recursively, diagnose known zero length
5772 array sections in depend clauses, handle array sections in reduction
5773 clause, diagnose negative length even for pointers.
5774 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5775 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5776 array sections in reduction clause, set
5777 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5778 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5779 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5780 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5781
21ba0cea
MP
57822015-10-06 Marek Polacek <polacek@redhat.com>
5783
5784 * c-parser.c (c_parser_statement_after_labels): Use
5785 protected_set_expr_location.
5786 (c_parser_omp_clause_num_gangs): Likewise.
5787 (c_parser_omp_clause_num_threads): Likewise.
5788 (c_parser_omp_clause_num_workers): Likewise.
5789 (c_parser_omp_clause_vector_length): Likewise.
5790 (c_parser_omp_clause_num_teams): Likewise.
5791 (c_parser_omp_clause_thread_limit): Likewise.
5792 * c-typeck.c (build_c_cast): Likewise.
5793 (c_cast_expr): Likewise.
5794
624d31fe
RS
57952015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5796
5797 * c-typeck.c (c_tree_equal): Use real_equal instead of
5798 REAL_VALUES_EQUAL.
5799
b8fd7909
JM
58002015-10-04 Jason Merrill <jason@redhat.com>
5801
5802 * c-parser.c (c_lex_one_token): Handle @synchronized.
5803 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5804 can change whether the function is transaction_safe.
5805
1c7485af
MP
58062015-10-02 Marek Polacek <polacek@redhat.com>
5807
5808 PR c/67730
5809 * c-typeck.c (convert_for_assignment): Use the expansion point
5810 location throughout.
5811
3e3b8d63
MP
58122015-10-02 Marek Polacek <polacek@redhat.com>
5813
5814 PR c/64249
5815 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5816 and pass it down to c_parser_if_statement.
5817 (c_parser_else_body): Add CHAIN parameter and pass it down to
5818 c_parser_statement_after_labels.
5819 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5820 duplicated if-else-if conditions.
5821
aabef2de
MP
58222015-10-01 Marek Polacek <polacek@redhat.com>
5823
5824 * c-typeck.c (convert_for_assignment): Improve commentary.
5825
de8ddd5f
MP
58262015-09-30 Marek Polacek <polacek@redhat.com>
5827
5828 PR c/67730
5829 * c-typeck.c (c_finish_return): Use the expansion point location for
5830 certain "return with value" warnings.
5831
c4914de6
MLI
58322015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5833
5834 * c-parser.c (pragma_lex): Add loc argument.
5835
0e36f5c7
MP
58362015-09-15 Marek Polacek <polacek@redhat.com>
5837
5838 PR c/67580
5839 * c-decl.c (tag_exists_p): New function.
5840 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5841 struct/union/enum keywords are missing.
5842 * c-tree.h (tag_exists_p): Declare.
5843
2f3bb934
MP
58442015-09-15 Marek Polacek <polacek@redhat.com>
5845
5846 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5847 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5848 Return NULL_TREE instead of 0.
5849 (lookup_name): Return NULL_TREE instead of 0.
5850 (lookup_name_in_scope): Likewise.
5851 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5852 (parser_xref_tag): Use false instead of 0.
5853 (start_struct): Use true instead of 1.
5854 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5855
aa256c4a
MP
58562015-09-14 Marek Polacek <polacek@redhat.com>
5857
5858 * c-typeck.c (set_nonincremental_init_from_string): Use
5859 HOST_WIDE_INT_M1U when shifting a negative value.
5860
dbb68221
MW
58612015-09-09 Mark Wielaard <mjw@redhat.com>
5862
5863 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5864 parm against NULL.
5865
a8a098ac
JJ
58662015-09-10 Jakub Jelinek <jakub@redhat.com>
5867
5868 PR c/67502
5869 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5870 into OMP_FOR_PRE_BODY rather than before the loop.
5871
f4b189d5
JJ
58722015-09-09 Jakub Jelinek <jakub@redhat.com>
5873
0bb99c11
JJ
5874 PR c/67501
5875 * c-parser.c (c_parser_oacc_all_clauses,
5876 c_parser_omp_all_clauses): Remove invalid clause from
5877 list of clauses even if parser->error is set.
5878
fce5e5e3
JJ
5879 PR c/67500
5880 * c-parser.c (c_parser_omp_clause_aligned,
5881 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5882 test for errors.
5883 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5884 error_mark_node.
5885
f4b189d5
JJ
5886 PR c/67495
5887 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5888 instead of c_parser_unary_expression. If the result is !lvalue_p,
5889 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5890
b2aaf235
MP
58912015-09-04 Marek Polacek <polacek@redhat.com>
5892
5893 PR sanitizer/67279
5894 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5895
1807ffc1
MS
58962015-09-03 Martin Sebor <msebor@redhat.com>
5897
5898 PR c/66516
8b652e65
JJ
5899 * c-typeck.c (convert_arguments, parser_build_unary_op,
5900 build_conditional_expr, c_cast_expr, convert_for_assignment,
5901 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5902 reject_gcc_builtin.
5903 (c_decl_implicit): Define.
5904
d04ff417
MP
59052015-09-02 Marek Polacek <polacek@redhat.com>
5906
5907 PR c/67432
5908 * c-parser.c (c_parser_enum_specifier): Give a better error for
5909 an empty enum.
5910
a79683d5
TS
59112015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5912
5913 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5914
191a6b94
MP
59152015-08-12 Marek Polacek <polacek@redhat.com>
5916
5917 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5918 LOC to it.
5919
420a9d9b
MP
59202015-08-03 Marek Polacek <polacek@redhat.com>
5921
5922 PR c/67088
5923 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5924 Use it.
5925 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5926
992118a1
PP
59272015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5928
5929 * c-parser.c (c_parser_if_body): Take token_indent_info
5930 argument. Call warn_for_misleading_indentation even when the
5931 body is a semicolon. Extract token_indent_infos corresponding
5932 to the guard, body and next tokens. Adjust call to
5933 warn_for_misleading_indentation accordingly.
5934 (c_parser_else_body): Likewise.
5935 (c_parser_if_statement): Likewise.
5936 (c_parser_while_statement): Likewise.
5937 (c_parser_for_statement): Likewise.
5938
46308474
LFSM
59392015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5940 Manuel López-Ibáñez <manu@gcc.gnu.org>
5941
5942 * c-decl.c (get_parm_info): Remove static var. Update warning
5943 message.
5944
05b28fd6
MP
59452015-07-27 Marek Polacek <polacek@redhat.com>
5946
5947 PR c++/66555
5948 PR c/54979
5949 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5950
451b5e48
MP
59512015-07-20 Marek Polacek <polacek@redhat.com>
5952
5953 PR c++/55095
5954 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5955 (build_binary_op): Warn about left shift overflows.
5956
1916bcb5
AM
59572015-07-09 Andrew MacLeod <amacleod@redhat.com>
5958
5959 * c-array-notation.c: Adjust includes for flags.h changes.
5960 * c-objc-common.c: Likewise.
5961
c7131fb2
AM
59622015-07-07 Andrew MacLeod <amacleod@redhat.com>
5963
5964 * c-array-notation.c: Adjust includes.
5965 * c-aux-info.c: Likewise.
5966 * c-convert.c: Likewise.
5967 * c-decl.c: Likewise.
5968 * c-errors.c: Likewise.
5969 * c-lang.c: Likewise.
5970 * c-objc-common.c: Likewise.
5971 * c-parser.c: Likewise.
5972 * c-typeck.c: Likewise.
5973
da2e71c9
MLI
59742015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5975
5976 PR fortran/66605
5977 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5978
b155cfd9
MP
59792015-06-29 Marek Polacek <polacek@redhat.com>
5980
5981 PR c/66322
5982 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5983 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5984 about -Wswitch-bool here.
5985 (do_case): Update c_add_case_label call.
5986 (c_finish_case): Update c_do_switch_warnings call.
5987
31521951
MP
59882015-06-27 Marek Polacek <polacek@redhat.com>
5989
5990 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5991
22d03525
MP
59922015-06-26 Marek Polacek <polacek@redhat.com>
5993
5994 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5995 INDIRECT_REF_P.
5996 * c-typeck.c (array_to_pointer_conversion): Likewise.
5997 (build_unary_op): Likewise.
5998 (c_finish_return): Likewise.
5999
f0889939
AM
60002015-06-25 Andrew MacLeod <amacleod@redhat.com>
6001
6002 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6003 * c-parser.c: Likewise.
6004
8d67ee55
RS
60052015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6006
6007 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6008 instead of pointer_hash.
6009 (detect_field_duplicates): Likewise.
6010
0ae9bd27
MP
60112015-06-25 Marek Polacek <polacek@redhat.com>
6012
6013 * c-array-notation.c: Use VAR_P throughout.
6014 * c-decl.c: Likewise.
6015 * c-objc-common.c: Likewise.
6016 * c-parser.c: Likewise.
6017 * c-typeck.c: Likewise.
6018
62f9079a
MP
60192015-06-25 Marek Polacek <polacek@redhat.com>
6020
6021 * c-decl.c: Use is_global_var throughout.
6022 * c-parser.c: Likewise.
6023 * c-typeck.c: Likewise.
6024
abb226c9
AM
60252015-06-17 Andrew MacLeod <amacleod@redhat.com>
6026
6027 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6028 * c-aux-info.c: Likewise.
6029 * c-convert.c: Likewise.
6030 * c-decl.c: Likewise.
6031 * c-errors.c: Likewise.
6032 * c-lang.c: Likewise.
6033 * c-objc-common.c: Likewise.
6034 * c-parser.c: Likewise.
6035 * c-typeck.c: Likewise.
6036
8cbababc
JH
60372015-06-11 Jan Hubicka <hubicka@ucw.cz>
6038
6039 PR middle-end/66325
6040 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6041 variants.
6042
a0349665
PMR
60432015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6044
6045 * c-decl.c (pop_scope): Register the main translation unit
6046 through the new debug hook.
6047
13fdf2e2
AM
60482015-06-08 Andrew MacLeod <amacleod@redhat.com>
6049
6050 * c-array-notation.c : Adjust include files.
6051 * c-aux-info.c : Likewise.
6052 * c-convert.c : Likewise.
6053 * c-decl.c : Likewise.
6054 * c-errors.c : Likewise.
6055 * c-lang.c : Likewise.
6056 * c-lang.h : Likewise.
6057 * c-objc-common.c : Likewise.
6058 * c-parser.c : Likewise.
6059 * c-typeck.c : Likewise.
6060
d7438551
AH
60612015-06-05 Aldy Hernandez <aldyh@redhat.com>
6062
6063 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6064 immediately clobber it.
6065 (c_write_global_declarations_1): Remove call to
6066 check_global_declaration_1.
6067 (c_write_global_declarations_2): Remove.
6068 (c_write_final_cleanups): Rename from c_write_global_declarations.
6069 Remove call to finalize_compilation_unit.
6070 Remove calls to debugging hooks.
6071 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6072 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6073 * c-tree.h: Remove c_write_global_declarations.
6074
ecb9f223
AM
60752015-06-04 Andrew MacLeod <amacleod@redhat.com>
6076
6077 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6078 * c-aux-info.c: Likewise.
6079 * c-convert.c: Likewise.
6080 * c-decl.c: Likewise.
6081 * c-errors.c: Likewise.
6082 * c-lang.c: Likewise.
6083 * c-objc-common.c: Likewise.
6084 * c-parser.c: Likewise.
6085 * c-typeck.c: Likewise.
6086
9482b620
MP
60872015-06-04 Marek Polacek <polacek@redhat.com>
6088
6089 PR c/66341
6090 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6091 it is a lvalue.
6092
bc51ace3
PK
60932015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6094
6095 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6096 Warn for empty struct.
6097 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6098
ea5b45b6
AT
60992015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6100
6101 * c-decl.c (start_function): Call plugin before parsing.
6102 (finish_function): Call plugin after parsing.
6103
c2d47482
PK
61042015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6105
6106 PR c/49551
6107 * c-decl.c (merge_decls): Merge DECL_COMMON.
6108
a95492ab
JW
61092015-05-22 Jim Wilson <jim.wilson@linaro.org>
6110
6111 * Make-lang.in (check_gcc_pallelize): Define.
6112
fd5c817a
MP
61132015-05-22 Marek Polacek <polacek@redhat.com>
6114
6115 PR c/47043
6116 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6117 attributes.
6118
c7b70a3c
MP
61192015-05-21 Marek Polacek <polacek@redhat.com>
6120
6121 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6122 DECL_BUILT_IN.
6123
21b634ae
MP
61242015-05-20 Marek Polacek <polacek@redhat.com>
6125
6126 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6127 * c-typeck.c: Likewise.
6128
296a8c2f
MP
61292015-05-19 Marek Polacek <polacek@redhat.com>
6130
6131 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6132
41b37d5e
JJ
61332015-05-19 Jakub Jelinek <jakub@redhat.com>
6134
6135 PR middle-end/66199
6136 * c-parser.c (c_parser_omp_for_loop): Don't add
6137 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6138 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6139 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6140 constructs.
6141
fab27f52
MM
61422015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6143
6144 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6145 swaps.
fab27f52 6146
40de31cf
MLI
61472015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6148
6149 PR fortran/44054
6150 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6151 accessor function.
6152
3aa3c9fc
MP
61532015-05-14 Marek Polacek <polacek@redhat.com>
6154
6155 PR c/66066
6156 PR c/66127
6157 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6158 rather than with 0.
6159
c3388e62
DM
61602015-05-12 David Malcolm <dmalcolm@redhat.com>
6161
6162 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6163 to add a call to warn_for_misleading_indentation.
6164 (c_parser_else_body): Likewise, adding param "else_loc".
6165 (c_parser_if_statement): Check for misleading indentation.
6166 (c_parser_while_statement): Likewise.
6167 (c_parser_for_statement): Likewise.
6168
755e528f
MP
61692015-05-08 Marek Polacek <polacek@redhat.com>
6170
6171 PR c/64918
6172 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6173 (output_init_element): Likewise.
6174
0173bd2a
MP
61752015-05-07 Marek Polacek <polacek@redhat.com>
6176
6177 PR c/65179
6178 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6179 value.
6180
9babc352
MP
61812015-04-30 Marek Polacek <polacek@redhat.com>
6182
6183 * c-typeck.c (set_init_label): Call error_at instead of error and
6184 pass LOC to it.
6185
ac9f18db
MP
6186 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6187 the type of a decl.
6188
ec3fba51
MP
6189 * c-typeck.c (c_build_va_arg): Clarify the error message.
6190
b811915d
TS
61912015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6192
6193 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6194 OMP_STANDALONE_CLAUSES.
6195
f3075008
MP
61962015-04-28 Marek Polacek <polacek@redhat.com>
6197
6198 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6199
4e81b788
MP
62002015-04-28 Marek Polacek <polacek@redhat.com>
6201
6202 PR c/65901
6203 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6204
6c1db78e
MP
62052015-04-25 Marek Polacek <polacek@redhat.com>
6206
6207 PR c/52085
6208 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6209 attribute.
6210
5c4abbb8
MP
62112015-04-23 Marek Polacek <polacek@redhat.com>
6212
6213 PR c/65345
6214 * c-decl.c (set_labels_context_r): New function.
6215 (store_parm_decls): Call it via walk_tree_without_duplicates.
6216 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6217 instead of create_tmp_var. Build TARGET_EXPR instead of
6218 COMPOUND_EXPR.
6219 (build_atomic_assign): Use create_tmp_var_raw instead of
6220 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6221
06aca1d5
IV
62222015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6223
6224 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6225 (c_parser_omp_target_update): Add missed %> to error_at ().
6226
8fba1830
BRF
62272015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6228
6229 PR target/55143
6230 * c-decl.c (c_default_pointer_mode): Remove definition.
6231 * c-tree.h (c_default_pointer_mode): Remove declaration.
6232
62021f64
TB
62332015-03-27 Tobias Burnus <burnus@net-b.de>
6234
6235 PR c/65586
6236 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6237 error out.
6238 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6239 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6240 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6241
9b65e171
JJ
62422015-03-19 Jakub Jelinek <jakub@redhat.com>
6243
6244 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6245 attribute for DECL_EXTERNAL VAR_DECLs.
6246
17958621
JJ
62472015-03-11 Jakub Jelinek <jakub@redhat.com>
6248
6249 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6250 argument.
6251
7ccb1a11
JJ
62522015-03-10 Jakub Jelinek <jakub@redhat.com>
6253
6254 PR c/65120
6255 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6256 before preparing arguments to warn_logical_not_parentheses.
6257
01177669
JJ
62582015-03-09 Jakub Jelinek <jakub@redhat.com>
6259
6260 PR c/65120
6261 * c-typeck.c (parser_build_binary_op): Don't warn for
6262 !!x == y or !b == y where b is _Bool.
6263
802ac282
MP
62642015-03-09 Marek Polacek <polacek@redhat.com>
6265
6266 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6267 * c-decl.c (grokdeclarator): Likewise.
6268 * c-typeck.c (build_binary_op): Likewise.
6269
e5165b60
MP
62702015-02-27 Marek Polacek <polacek@redhat.com>
6271
6272 PR c/65228
6273 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6274
065d214c
MP
62752015-02-14 Marek Polacek <polacek@redhat.com>
6276
6277 PR c/64768
6278 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6279 declared through a typedef name.
6280
e5d9235b
MP
62812015-02-13 Marek Polacek <polacek@redhat.com>
6282
6283 PR c/65050
6284 * c-decl.c (grokdeclarator): Print also the type when giving
6285 the error message about array's incomplete element type.
6286
fa01ffcc
JJ
62872015-02-11 Jakub Jelinek <jakub@redhat.com>
6288
6289 PR c/64824
6290 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6291 check in the POP macro.
6292
c3e38a03
MP
62932015-02-09 Marek Polacek <polacek@redhat.com>
6294
6295 PR c/64856
6296 * c-typeck.c (process_init_element): Don't always wrap
6297 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6298 initializing a range of elements.
6299
4886ec8e
JJ
63002015-02-04 Jakub Jelinek <jakub@redhat.com>
6301
6302 PR c/64824
6303 PR c/64868
6304 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6305
c3e38a03 63062015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6307
6308 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6309 processing enum declaration.
6310
7b33f0c8
MP
63112015-01-29 Marek Polacek <polacek@redhat.com>
6312
6313 PR c/64709
6314 * c-typeck.c (pop_init_level): If constructor_elements has
6315 exactly one element with integer_zerop value, set constructor_zeroinit
6316 to 1. Remove braces around warning_init call.
6317
dea63e49
JJ
63182015-01-27 Jakub Jelinek <jakub@redhat.com>
6319
6320 PR c/64766
6321 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6322 of FUNCTION_DECLs with error_mark_node.
6323
d38f7dce
JJ
63242015-01-26 Jakub Jelinek <jakub@redhat.com>
6325
6326 PR c/64778
6327 * c-typeck.c (convert_arguments): Return -1 if there are
6328 error_args, even if we've diagnosed too many arguments.
6329
cbf5d0e7
RB
63302015-01-21 Richard Biener <rguenther@suse.de>
6331
6332 PR middle-end/64313
6333 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6334 for builtins the user declared correctly.
6335
41dbbb37
TS
63362015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6337 Bernd Schmidt <bernds@codesourcery.com>
6338 Cesar Philippidis <cesar@codesourcery.com>
6339 James Norris <jnorris@codesourcery.com>
6340 Jakub Jelinek <jakub@redhat.com>
6341 Ilmir Usmanov <i.usmanov@samsung.com>
6342
6343 * c-parser.c: Include "gomp-constants.h".
6344 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6345 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6346 Use OMP_CLAUSE_SET_MAP_KIND.
6347 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6348 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6349 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6350 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6351 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6352 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6353 "copyout", "create", "delete", "deviceptr", "gang", "host",
6354 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6355 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6356 "present_or_create", "pcreate", "seq", "self", "vector",
6357 "vector_length", "wait", "worker".
6358 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6359 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6360 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6361 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6362 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6363 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6364 (c_parser_oacc_data_clause_deviceptr)
6365 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6366 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6367 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6368 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6369 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6370 (c_parser_oacc_parallel, c_parser_oacc_update)
6371 (c_parser_oacc_wait): New functions.
6372 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6373 (c_finish_oacc_data): New prototypes.
6374 * c-typeck.c: Include "gomp-constants.h".
6375 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6376 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6377 OMP_CLAUSE_SET_MAP_KIND.
6378 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6379 (c_finish_oacc_data): New functions.
6380 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6381 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6382 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6383 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6384 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6385 GOMP_MAP_FORCE_DEVICEPTR.
6386
adfac8df
JJ
63872015-01-09 Michael Collison <michael.collison@linaro.org>
6388
6389 * c-array-notation.c: Include hash-set.h, machmode.h,
6390 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6391 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6392 * c-aux-info.c: Ditto.
6393 * c-convert.c: Ditto.
6394 * c-decl.c: Ditto.
6395 * c-errors.c: Ditto.
6396 * c-lang.c: Dittoxs.
6397 * c-objc-common.c: Ditto.
6398 * c-parser.c: Ditto.
6399 * c-typeck.c: Include hash-set.h, machmode.h,
6400 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6401 fold-const.h, wide-int.h, inchash.h, real.h and
6402 fixed-value.h due to flattening of tree.h.
6403
2cc901dc
MP
64042015-01-07 Marek Polacek <polacek@redhat.com>
6405
6406 PR c/64417
6407 * c-typeck.c (process_init_element): Disallow initialization of
6408 a flexible array member with a string constant if the structure
6409 is in an array.
6410
5624e564
JJ
64112015-01-05 Jakub Jelinek <jakub@redhat.com>
6412
e5341100
JJ
6413 PR sanitizer/64344
6414 * c-typeck.c (convert_for_assignment, c_finish_return): For
6415 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6416 types also set in_late_binary_op around convert call.
6417 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6418 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6419 result on expr as last argument to ubsan_instrument_float_cast,
6420 if in_late_binary_op, don't use c_save_expr but save_expr.
6421
5624e564
JJ
6422 Update copyright years.
6423
5bd012f8
MP
64242015-01-05 Marek Polacek <polacek@redhat.com>
6425
6426 PR c/64423
6427 * c-typeck.c (build_array_ref): Pass loc down to
6428 warn_array_subscript_with_type_char.
6429
3f8257db 64302014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6431
6432 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6433 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6434 element type.
8e745a17 6435 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6436 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6437 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6438 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6439 to PEDWARN_FOR_QUALIFIERS.
768952be 6440
8f94a8c4
JJ
64412014-12-17 Jakub Jelinek <jakub@redhat.com>
6442
6443 PR sanitizer/64289
6444 * c-convert.c: Include ubsan.h.
6445 (convert): For real -> integral casts and
6446 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6447 instead instrument the float cast directly.
6448
b731b390
JJ
64492014-11-29 Jakub Jelinek <jakub@redhat.com>
6450
6451 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6452 c_finish_stmt_expr): Remove NULL last argument from
6453 create_tmp_var_raw and create_tmp_var calls.
6454 * c-array-notation.c (fix_builtin_array_notation_fn,
6455 build_array_notation_expr, fix_conditional_array_notations_1,
6456 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6457
541e35a6
MP
64582014-11-28 Marek Polacek <polacek@redhat.com>
6459
6460 PR c/63862
6461 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6462 convert the right operand to integer type.
6463
b286be94
MP
64642014-11-25 Marek Polacek <polacek@redhat.com>
6465
6466 PR c/63877
6467 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6468 for inline functions.
6469
aa7da51a
JJ
64702014-11-21 Jakub Jelinek <jakub@redhat.com>
6471
6472 PR target/63764
6473 * c-typeck.c (build_array_ref): Adjust
6474 convert_vector_to_pointer_for_subscript caller. If it returns true,
6475 call non_lvalue_loc on the result.
6476
d876207f
RB
64772014-11-11 Richard Biener <rguenther@suse.de>
6478
6479 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6480 to true.
6481
e5e44252
AK
64822014-11-10 Andi Kleen <ak@linux.intel.com>
6483
6484 PR c/60804
6485 * c-parser.c (c_parser_statement_after_labels): Call
6486 check_no_cilk.
6487 (c_parser_if_statement): Dito.
6488 (c_parser_switch_statement): Dito.
6489 (c_parser_while_statement): Dito.
6490 (c_parser_do_statement): Dito.
6491 (c_parser_for_statement): Dito.
6492 * c-typeck.c (c_finish_loop): Dito.
6493
13c21655
PC
64942014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6495
6496 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6497 OPT_Wshift_count_overflow in the warnings.
6498
2d51fcef
MP
64992014-10-30 Marek Polacek <polacek@redhat.com>
6500
6501 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6502 print the stripped version as well, if they're not the same.
6503
ef4bddc2
RS
65042014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6505
6506 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6507 machine_mode.
6508
c582198b
AM
65092014-10-28 Andrew MacLeod <amacleod@redhat.com>
6510
6511 * c-decl.c: Adjust include files.
6512 * c-parser.c: Ditto.
6513
ddc8de03
PM
65142014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6515 Tom Tromey <tromey@redhat.com>
6516
6517 * c-tree.h (enum c_oracle_request): New.
6518 (c_binding_oracle_function): New typedef.
6519 (c_binding_oracle, c_pushtag, c_bind): Declare.
6520 * c-decl.c (c_binding_oracle): New global.
6521 (I_SYMBOL_CHECKED): New macro.
6522 (i_symbol_binding): New function.
6523 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6524 (I_TAG_CHECKED): New macro.
6525 (i_tag_binding): New function.
6526 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6527 (I_LABEL_CHECKED): New macro.
6528 (i_label_binding): New function.
6529 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6530 (c_print_identifier): Save and restore c_binding_oracle.
6531 (c_pushtag, c_bind): New functions.
6532
60393bbc
AM
65332014-10-27 Andrew MacLeod <amacleod@redhat.com>
6534
6535 * c-typeck.c: Adjust include files.
6536
d723bb7c
MLI
65372014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6538
6539 PR c++/53061
6540 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6541 initialization here...
6542 (c_initialize_diagnostics): ... but here. Set defaults after
6543 building pretty-printer.
6544
1bc5a451
MP
65452014-10-23 Marek Polacek <polacek@redhat.com>
6546
6547 PR c/63626
6548 * c-decl.c (pop_scope): Don't print warning in external_scope.
6549
4435bb92
MP
65502014-10-19 Marek Polacek <polacek@redhat.com>
6551
6552 PR c/63567
6553 * c-typeck.c (output_init_element): Allow initializing objects with
6554 static storage duration with compound literals even in C99 and add
6555 pedwarn for it.
6556
7278465e
MP
65572014-10-17 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/63567
6560 * c-typeck.c (digest_init): Allow initializing objects with static
6561 storage duration with compound literals even in C99 and add pedwarn
6562 for it.
6563
d9b7be2e
MP
65642014-10-17 Marek Polacek <polacek@redhat.com>
6565
6566 PR c/63543
6567 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6568 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6569 error multiple times. Print the type.
6570
f406ae1f
MP
65712014-10-17 Marek Polacek <polacek@redhat.com>
6572
6573 PR c/63549
6574 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6575 type.
6576
92574c7c
MP
65772014-10-17 Marek Polacek <polacek@redhat.com>
6578
6579 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6580 (start_function): Use OPT_Wimplicit_int instead of 0.
6581 (store_parm_decls_oldstyle): Likewise.
6582
1bc4a978
MT
65832014-10-17 Alan Modra <amodra@gmail.com>
6584
6585 PR middle-end/61848
6586 * c-decl.c (merge_decls): Don't merge section name or tls model
6587 to newdecl symtab node, instead merge to olddecl. Override
6588 existing olddecl section name. Set tls_model for all thread-local
6589 vars, not just OMP thread-private ones. Remove incorrect comment.
6590
83685514
AM
65912014-10-16 Andrew MacLeod <amacleod@redhat.com>
6592
6593 * c-decl.c: Adjust include files.
6594
78a7c317
DD
65952014-10-14 DJ Delorie <dj@redhat.com>
6596
6597 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6598 (c_token_starts_typename): Check all __intN, not just __int128.
6599 (c_token_starts_declspecs): Likewise.
6600 (c_parser_declspecs): Likewise.
6601 (c_parser_attribute_any_word): Likewise.
6602 (c_parser_objc_selector): Likewise.
6603 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6604 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6605 is specified.
6606 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6607 __int128.
6608 (finish_declspecs): Likewise.
6609
74d98c1e
AB
66102014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6611
8e745a17 6612 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6613 the duplicate code.
8e745a17 6614 (c_parser_statement): Call the new function.
74d98c1e 6615
84937de2
MP
66162014-10-09 Marek Polacek <polacek@redhat.com>
6617
6618 PR c/63480
6619 * c-typeck.c (pop_init_level): Don't warn about initializing
6620 with { }.
6621
0382aaa0
MP
66222014-10-07 Marek Polacek <polacek@redhat.com>
6623
6624 PR c/59717
6625 * c-decl.c (header_for_builtin_fn): New function.
6626 (implicitly_declare): Suggest which header to include.
6627
7a0ca710
MP
66282014-10-07 Marek Polacek <polacek@redhat.com>
6629
6630 * c-convert.c (convert): Use error_operand_p.
6631 * c-typeck.c (require_complete_type): Likewise.
6632 (really_atomic_lvalue): Likewise.
6633 (digest_init): Likewise.
6634 (handle_omp_array_sections_1): Likewise.
6635
6bc8a126
MP
66362014-10-03 Marek Polacek <polacek@redhat.com>
6637
6638 PR c/63453
6639 * c-decl.c (pop_scope): Don't warn about "inline function declared
6640 but never defined" for functions marked with gnu_inline attribute.
6641
d90c0a59
JJ
66422014-09-25 Jakub Jelinek <jakub@redhat.com>
6643
6644 PR c++/63249
6645 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6646 on low_bound and length.
6647
083e891e
MP
66482014-09-24 Marek Polacek <polacek@redhat.com>
6649
6650 PR c/61405
6651 PR c/53874
6652 * c-parser.c: Don't define CPP_KEYWORD.
6653 (c_parser_switch_statement): Pass original type to c_finish_case.
6654 * c-tree.h (c_finish_case): Update declaration.
6655 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6656 conditionally to c_do_switch_warnings.
6657
8d95fe25
MP
66582014-09-03 Marek Polacek <polacek@redhat.com>
6659
6660 PR c/62024
6661 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6662 conversions.
6663
9a771876
JJ
66642014-09-02 Jakub Jelinek <jakub@redhat.com>
6665 Balaji V. Iyer <balaji.v.iyer@intel.com>
6666 Igor Zamyatin <igor.zamyatin@intel.com>
6667
6668 * c-parser.c (c_parser_cilk_for): New function.
6669 (c_parser_cilk_grainsize): Likewise.
6670 (c_get_temp_regvar): Likewise.
6671 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6672 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6673 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6674 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6675 case.
6676
b7679d96
CG
66772014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6678
6679 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6680 with using HOST_WIDE_INT without truncation to 'int'
6681
59ea0364
MP
66822014-08-22 Marek Polacek <polacek@redhat.com>
6683
6684 PR c++/62199
6685 * c-typeck.c (parser_build_binary_op): Adjust call to
6686 warn_logical_not_parentheses.
6687
671a475e
IZ
66882014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6689
6690 PR other/62008
6691 * c-parser.c (c_parser_array_notation): Check for correct
6692 type of an array added.
6693
04159acf
MP
66942014-08-19 Marek Polacek <polacek@redhat.com>
6695
6696 PR c++/62153
6697 * c-typeck.c (build_binary_op): If either operand of a comparison
6698 is a boolean expression, call maybe_warn_bool_compare.
6699
c77935ee
PP
67002014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6701
6702 PR c/45584
6703 * c-typeck.c (build_c_cast): Do a conversion even when the
6704 TYPE_MAIN_VARIANTs are the same.
6705
35aff4fb
MP
67062014-08-19 Marek Polacek <polacek@redhat.com>
6707
6708 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6709 pedwarn_c99 instead of pedwarn.
6710 (grokfield): Likewise.
6711 (warn_defaults_to): New function.
6712 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6713 Unconditionally call pedwarn_c99 instead of pedwarn.
6714 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6715 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6716 check flag_isoc11 before.
6717 * c-errors.c (pedwarn_c99): Change the return type to bool.
6718 Handle -Wc99-c11-compat.
6719 * c-parser.c (disable_extension_diagnostics): Handle
6720 warn_c99_c11_compat.
6721 (restore_extension_diagnostics): Likewise.
6722 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6723 instead of pedwarn, don't check flag_isoc11 before.
6724 (c_parser_declspecs): Likewise.
6725 (c_parser_alignas_specifier): Likewise.
6726 (c_parser_alignof_expression): Likewise.
6727 (c_parser_generic_selection): Likewise.
6728 * c-tree.h (pedwarn_c99): Update declaration.
6729 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6730 of pedwarn_c99.
6731
177cce46
MP
67322014-08-19 Marek Polacek <polacek@redhat.com>
6733
6734 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6735 to pedwarn_c90.
6736 * c-errors.c: Include "opts.h".
6737 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6738 * c-parser.c (disable_extension_diagnostics): Handle negative value
6739 of warn_c90_c99_compat, too.
6740 (restore_extension_diagnostics): Likewise.
6741 (c_parser_compound_statement_nostart): Pass
6742 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6743
6dc99c33
MP
67442014-08-12 Marek Polacek <polacek@redhat.com>
6745
6746 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6747 Add pedwarn.
6748 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6749 Likewise.
6750 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6751
3f8257db 67522014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6753
6754 PR c/51849
6755 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6756 Call pedwarn_c90 instead of pedwarn.
6757 (check_bitfield_type_and_width): Likewise.
6758 (declspecs_add_qual): Likewise.
6759 (declspecs_add_type): Likewise.
6760 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6761 Adjust to only call pedwarn_c90.
6762 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6763 pedwarn_c90 instead of pedwarn.
6764 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6765 * c-parser.c (disable_extension_diagnostics): Handle
6766 warn_c90_c99_compat.
6767 (restore_extension_diagnostics): Likewise.
6768 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6769 pedwarn_c90 instead of pedwarn.
6770 (c_parser_initelt): Likewise.
6771 (c_parser_postfix_expression): Likewise.
6772 (c_parser_postfix_expression_after_paren_type): Likewise.
6773 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6774 * c-tree.h: Fix formatting.
6775 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6776 pedwarn_c90 instead of pedwarn.
6777
9f25a338
TS
67782014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6779
6780 * c-typeck.c: Remove include of pointer-set.h.
6781
044331a8
MP
67822014-08-07 Marek Polacek <polacek@redhat.com>
6783
6784 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6785
b787e7a2
TS
67862014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6787
6788 * c-typeck.c: Use hash_map instead of pointer_map.
6789
6e2830c3
TS
67902014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6791
6792 * c-decl.c: Use hash_set instead of pointer_set.
6793
a7ee52fb
IZ
67942014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6795
6796 PR middle-end/61455
6797 * c-array-notation.c (expand_array_notations): Handling
6798 of DECL_EXPR added.
6799
b4dfdc11
MG
68002014-07-31 Marc Glisse <marc.glisse@inria.fr>
6801
6802 PR c++/60517
6803 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6804 a local variable.
6805
976d5a22
TT
68062014-07-30 Tom Tromey <tromey@redhat.com>
6807
6808 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6809 field.
6810 (really_start_incremental_init, push_init_level): Initialize
6811 designator_depth.
6812 (pop_init_level): Set global designator_depth.
6813 (process_init_element): Check for designated_init attribute.
6814
30281de2
MP
68152014-07-20 Marek Polacek <polacek@redhat.com>
6816
6817 PR c/61852
6818 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6819 (implicitly_declare): Pass location to implicit_decl_warning.
6820
b108f48f
JJ
68212014-07-14 Jakub Jelinek <jakub@redhat.com>
6822
6823 PR middle-end/61294
6824 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6825 If non-NULL, call c_parser_check_literal_zero.
6826 (c_parser_check_literal_zero): New function.
6827 (c_parser_postfix_expression_after_primary): Adjust
6828 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6829
773ec47f
MP
68302014-07-06 Marek Polacek <polacek@redhat.com>
6831
6832 PR c/6940
6833 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6834 * c-tree.h (C_ARRAY_PARAMETER): Define.
6835 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6836 function parameter.
6837
22e1cf1c 68382014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6839 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6840
6841 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6842 releasing symbol.
6843
52ec0ea3
MP
68442014-07-01 Marek Polacek <polacek@redhat.com>
6845
6846 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6847 instead of 0 to WARN_FOR_ASSIGNMENT.
6848
d5c3d343
MP
68492014-07-01 Marek Polacek <polacek@redhat.com>
6850
6851 PR c/58286
6852 * c-typeck.c (convert_for_assignment): Pass
6853 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6854
6a7253a4
MP
68552014-06-30 Marek Polacek <polacek@redhat.com>
6856
6857 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6858 has no_sanitize_undefined attribute.
6859
5e88a8f4
IZ
68602014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6861
6862 PR middle-end/57541
6863 * c-array-notation.c (fix_builtin_array_notation_fn):
6864 Check for 0 arguments in builtin call. Check that bultin argument is
6865 correct.
6866 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6867 index.
6868
9698b078
SH
68692014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6870
6871 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6872 qualifiers in __auto_type for atomic types.
6873 (c_parser_typeof_specifier): Discard all type qualifiers in
6874 __typeof__ for atomic types.
6875
6e07c515
MP
68762014-06-25 Marek Polacek <polacek@redhat.com>
6877
6878 PR c/61162
6879 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6880 the return expression to c_finish_return.
6881
da6f124d
JJ
68822014-06-25 Jakub Jelinek <jakub@redhat.com>
6883
6884 * c-typeck.c (c_finish_omp_clauses): Make sure
6885 OMP_CLAUSE_LINEAR_STEP has correct type.
6886
c203e8a7
TS
68872014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6888
6889 * c-decl.c: Adjust.
6890
56ad0e38
JJ
68912014-06-24 Jakub Jelinek <jakub@redhat.com>
6892
6893 * c-parser.c (c_parser_omp_for_loop): For
6894 #pragma omp parallel for simd move lastprivate clause from parallel
6895 to for rather than simd.
6896
47c2554f
MP
68972014-06-23 Marek Polacek <polacek@redhat.com>
6898
6899 * c-typeck.c (parser_build_binary_op): Don't call
6900 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6901
56363ffd
JH
69022014-06-15 Jan Hubicka <hubicka@ucw.cz>
6903
6904 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6905 * c-decl.c (merge_decls): Likewise.
6906
d7ff7ae5
MP
69072014-06-09 Marek Polacek <polacek@redhat.com>
6908
6909 PR c/36446
6910 * c-typeck.c (error_init): Call inform instead of error_at.
6911 (pedwarn_init): Call inform instead of pedwarn.
6912 (warning_init): Call inform instead of warning_at.
6913
24d047a3
JH
69142014-06-07 Jan Hubicka <hubicka@ucw.cz>
6915
6916 * c-decl.c (merge_decls): Use set_decl_section_name.
6917 (duplicate_decls): Remove node if it exists.
6918
9bac5cbb
G
69192014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6920
6921 PR c/53119
6922 * c-typeck.c (push_init_level, process_init_element,
6923 pop_init_level): Correct check for zero initialization, move
6924 missing brace warning to respect zero initialization.
6925
8ffcdea8
MP
69262014-06-05 Marek Polacek <polacek@redhat.com>
6927
6928 PR c/56724
6929 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6930
742938c9
MP
69312014-06-05 Marek Polacek <polacek@redhat.com>
6932
6933 PR c/49706
6934 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6935 on the left hand side operand of a comparison.
742938c9 6936
6447c55d
MP
69372014-06-05 Marek Polacek <polacek@redhat.com>
6938
6939 PR c/48062
6940 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6941 Print note only if the warning was printed.
6942
9dc7743c
IZ
69432014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6944
6945 PR c/58942
6946 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6947 with a pointer.
6948
fedfecef
MP
69492014-06-03 Marek Polacek <polacek@redhat.com>
6950
6951 PR c/60439
6952 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6953 c_start_case.
6954 * c-tree.h (c_start_case): Update.
6955 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6956 switch condition has boolean value.
6957
9b2b7279
AM
69582014-06-02 Andrew MacLeod <amacleod@redhat.com>
6959
6960 * c-decl.c: Include builtins.h.
6961 * c-parser.c: Likewise.
6962
5c1bc275
MP
69632014-05-27 Marek Polacek <polacek@redhat.com>
6964
6965 PR c/56724
6966 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6967 error and warning calls to error_at and warning_at. Pass location of
6968 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6969 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6970 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6971
97563bc8
IZ
69722014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6973
6974 PR c/61191
6975 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6976 function parameters.
6977
aede2c10
JH
69782014-05-23 Jan Hubicka <hubicka@ucw.cz>
6979
6980 * c-decl.c (merge_decls): Preserve symtab node pointers.
6981 (duplicate_decls): Free new decl.
6982
edbba2ce
TS
69832014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6984
f3316c6d
TS
6985 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6986 initialization.
6987
edbba2ce
TS
6988 * c-parser.c (c_parser_omp_target): Return bool values.
6989
68c81f24
TS
69902014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6991
6992 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6993 num_teams_loc variable to num_thread_limit_loc.
6994
632f2871
RS
69952014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6996
6997 * c-array-notation.c (expand_array_notations): Use void_node
6998 instead of void_zero_node.
6999
766090c2
TS
70002014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7001
7002 * c-decl.c (finish_struct): Adjust.
7003 (finish_enum): Likewise.
7004 (bind): Adjust.
7005 (record_inline_static): Likewise.
7006 (push_scope): Likewise.
7007 (make_label): Likewise.
7008 (lookup_label_for_goto): Likewise.
7009 (finish_struct): Likewise.
7010 (finish_enum): Likewise.
7011 (store_parm_decls): Likewise.
7012 (c_push_function_context): Likewise.
7013 * c-lang.h: Remove usage of variable_size gty attribute.
7014 * c-parser.c (c_parse_init): Adjust.
7015 (c_parse_file): Likewise.
7016
2b107f6b
MP
70172014-05-13 Marek Polacek <polacek@redhat.com>
7018
7019 PR c/61162
7020 * c-typeck.c (convert_for_assignment): Pass location to
7021 WARN_FOR_ASSIGNMENT instead of input_location.
7022
d033409e
MP
70232014-05-10 Marek Polacek <polacek@redhat.com>
7024
7025 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7026 maybe_warn_string_init.
7027 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7028 maybe_warn_string_init.
7029 * c-tree.h (maybe_warn_string_init): Update declaration.
7030 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7031 Call pedwarn_init with loc instead of with input_location.
7032 (digest_init): Pass init_loc to maybe_warn_string_init.
7033 (pop_init_level): Call pedwarn_init with loc instead of with
7034 input_location.
7035 (set_init_index): Likewise.
7036 (process_init_element): Likewise.
7037
ea58ef42
MP
70382014-05-09 Marek Polacek <polacek@redhat.com>
7039
7040 PR c/61096
7041 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7042 (c_parser_initelt): Pass location to set_init_label. Pass array index
7043 location to set_init_index.
7044 * c-tree.h (push_init_level): Update declaration.
7045 (pop_init_level): Likewise.
7046 (set_init_index): Likewise.
7047 (set_init_label): Likewise.
7048 * c-typeck.c (error_init): Add location parameter. Call error_at
7049 instead of error.
7050 (digest_init): Pass init_loc to error_init.
7051 (really_start_incremental_init):
7052 (push_init_level): Add location parameter. Pass loc to pop_init_level
7053 and error_init.
7054 (pop_init_level): Likewise.
7055 (set_designator): Add location parameter. Pass loc to pop_init_level,
7056 push_init_level, and error_init.
7057 (set_init_index): Add location parameter. Pass loc to error_init and
7058 set_designator.
7059 (set_init_label): Likewise.
7060 (output_init_element): Pass loc to error_init.
7061 (process_init_element): Pass loc to error_init, pop_init_level,
7062 pedwarn_init, and push_init_level.
7063
661a0813
MP
70642014-05-09 Marek Polacek <polacek@redhat.com>
7065
7066 PR c/50459
7067 * c-parser.c (c_parser_attributes): Parse the arguments as an
7068 expression-list if the attribute takes identifier.
7069
2793eeab
MP
70702014-05-08 Marek Polacek <polacek@redhat.com>
7071
7072 PR c/61053
7073 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7074 TYPE_ALIGN_UNIT.
7075
f827930a
MP
70762014-05-08 Marek Polacek <polacek@redhat.com>
7077
7078 PR c/61077
7079 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7080 of main.
7081
1d60af08
KZ
70822014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7083 Mike Stump <mikestump@comcast.net>
7084 Richard Sandiford <rdsandiford@googlemail.com>
7085
7086 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7087 (finish_enum): Use wide-int interfaces.
7088 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7089 * c-typeck.c (build_c_cast): Likewise.
7090 (set_nonincremental_init_from_string): Likewise.
7091 (c_tree_equal): Likewise.
7092
a0e24419
MP
70932014-05-02 Marek Polacek <polacek@redhat.com>
7094
7095 PR c/25801
7096 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7097 Return size_one_node when the type is not complete.
7098 (pointer_diff): Remove comment.
7099 (build_unary_op): Improve error messages.
7100
19fc9faa
MP
71012014-05-02 Marek Polacek <polacek@redhat.com>
7102
7103 * c-typeck.c (c_finish_return): Separate warning_at calls.
7104
63bc4e87
MP
71052014-05-02 Marek Polacek <polacek@redhat.com>
7106
7107 * c-tree.h (error_init): Remove declaration.
7108 (pedwarn_init): Likewise.
7109 * c-typeck.c (error_init): Make static and move above.
7110 (pedwarn_init): Likewise.
7111 (warning_init): Move above.
7112 (maybe_warn_string_init): Likewise.
7113
4bd2511b
JL
71142014-05-01 Jeff Law <law@redhat.com>
7115
7116 Revert:
7117
7118 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7119 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7120 avoid goto.
7121
6a358dcb
MP
71222014-05-02 Marek Polacek <polacek@redhat.com>
7123
7124 PR c/60784
7125 * c-typeck.c (push_init_level): Set constructor_designated to
7126 p->designated for structures.
7127
ae5ebda4
MP
71282014-05-01 Marek Polacek <polacek@redhat.com>
7129
7130 PR c/60915
7131 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7132 function-definition has an attribute after the declarator.
7133
96b40f8d
MP
71342014-05-01 Marek Polacek <polacek@redhat.com>
7135
7136 PR c/60257
7137 * c-typeck.c (warning_init): Add location_t parameter. Call
7138 warning_at instead of warning.
7139 (push_init_level): Pass input_location to warning_init.
7140 (add_pending_init): Add location_t parameter. Pass loc to
7141 warning_init.
7142 (set_nonincremental_init): Pass input_location to add_pending_init.
7143 (set_nonincremental_init_from_string): Likewise.
7144 (output_init_element): Pass loc to warning_init and to
7145 add_pending_init.
7146
32e00768
MP
71472014-05-01 Marek Polacek <polacek@redhat.com>
7148
7149 PR c/43395
7150 * c-typeck.c (c_finish_return): Distinguish between label and variable
7151 when warning about returning local address.
7152
c9379ce2
MP
71532014-05-01 Marek Polacek <polacek@redhat.com>
7154
7155 PR c/29467
7156 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7157 in C89 mode.
7158
d00887e8
MP
71592014-05-01 Marek Polacek <polacek@redhat.com>
7160
7161 PR c/43245
7162 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7163 instead of 0 to WARN_FOR_QUALIFIERS.
7164
5436fa2e
MP
71652014-05-01 Marek Polacek <polacek@redhat.com>
7166
7167 PR c/56989
7168 * c-typeck.c (default_conversion): Use better location for
7169 error call.
7170
f8ed5150
MP
71712014-04-30 Marek Polacek <polacek@redhat.com>
7172
7173 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7174 also when SANITIZE_FLOAT_DIVIDE is on.
7175
8337d1db
MP
71762014-04-30 Marek Polacek <polacek@redhat.com>
7177
7178 PR c/60139
7179 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7180 and pedwarn_init. Use loc insted of input_location.
7181
c4bdc42f
MP
71822014-04-30 Marek Polacek <polacek@redhat.com>
7183
7184 PR c/60351
7185 * c-typeck.c (build_binary_op): Use location when warning about
7186 shift count.
7187
45484dcf
MP
71882014-04-25 Marek Polacek <polacek@redhat.com>
7189
7190 PR c/18079
7191 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7192 always_inline/noinline and hot/cold attributes.
7193
34cf811f
MP
71942014-04-25 Marek Polacek <polacek@redhat.com>
7195
7196 PR c/60114
7197 * c-parser.c (c_parser_initelt): Pass input_location to
7198 process_init_element.
7199 (c_parser_initval): Pass loc to process_init_element.
7200 * c-tree.h (process_init_element): Adjust declaration.
7201 * c-typeck.c (push_init_level): Pass input_location to
7202 process_init_element.
7203 (pop_init_level): Likewise.
7204 (set_designator): Likewise.
7205 (output_init_element): Add location_t parameter. Pass loc to
7206 digest_init.
7207 (output_pending_init_elements): Pass input_location to
7208 output_init_element.
7209 (process_init_element): Add location_t parameter. Pass loc to
7210 output_init_element.
7211
42056eac
JJ
72122014-04-24 Jakub Jelinek <jakub@redhat.com>
7213
7214 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7215 atomic-clause, allow comma in between atomic-clause and
7216 seq_cst.
7217
e162a134
JJ
72182014-04-22 Jakub Jelinek <jakub@redhat.com>
7219
7220 PR c/59073
7221 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7222 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7223
2f6babac
IZ
72242014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7225
7226 PR middle-end/60469
7227 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7228 create_tmp_var instead build_decl for creating temps.
7229 (build_array_notation_expr): Likewise.
7230 (fix_conditional_array_notations_1): Likewise.
7231 (fix_array_notation_expr): Likewise.
7232 (fix_array_notation_call_expr): Likewise.
7233
8edbfaa6
JJ
72342014-03-28 Jakub Jelinek <jakub@redhat.com>
7235
7236 PR c++/60689
7237 * c-tree.h (c_build_function_call_vec): New prototype.
7238 * c-typeck.c (build_function_call_vec): Don't call
7239 resolve_overloaded_builtin here.
7240 (c_build_function_call_vec): New wrapper function around
7241 build_function_call_vec. Call resolve_overloaded_builtin here.
7242 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7243 Call c_build_function_call_vec instead of build_function_call_vec.
7244 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7245 * c-decl.c (finish_decl): Likewise.
7246
7485aeea
MLI
72472014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7248
7249 PR c/55383
7250 * c-typeck.c: Use correct format string in cast-qual warning
7251
b17a8b07
TS
72522014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7253
7254 * c-decl.c (c_decl_attributes): Use
7255 lang_hooks.types.omp_mappable_type.
7256 * c-typeck.c (c_finish_omp_clauses): Likewise.
7257
3af9c5e9
MP
72582014-03-06 Marek Polacek <polacek@redhat.com>
7259
7260 PR c/60197
7261 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7262 of checking tree code.
7263
1c9f5f33
PK
72642014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7265
7266 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7267 (c_parser_parameter_declaration): Likewise.
7268
cc28fc7f
MP
72692014-02-19 Marek Polacek <polacek@redhat.com>
7270
7271 PR c/60195
7272 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7273 Call mark_exp_read on exp.value.
7274 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7275 TREE_ADDRESSABLE on old instead of val.
7276 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7277
b581c05c
PK
72782014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7279
7280 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7281 C_EXPR_APPEND by vec_safe_push.
7282 * c-tree.h (C_EXPR_APPEND): Remove.
7283
81e5eca8
MP
72842014-01-31 Marek Polacek <polacek@redhat.com>
7285
7286 PR c/59963
7287 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7288 build_function_call_vec.
7289 (build_function_call): Likewise.
7290 (build_atomic_assign): Likewise.
7291 (build_function_call_vec): Add arg_loc parameter. Use it.
7292 (convert_arguments): Likewise.
7293 (convert_for_assignment): Rename rhs_loc to expr_loc.
7294 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7295 (c_parser_objc_keywordexpr): Likewise.
7296 (c_parser_postfix_expression_after_primary): Call
7297 build_function_call_vec with expr_loc rather than op_loc.
7298 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7299 build_function_call_vec.
7300 (c_parser_expr_list): Add locations parameter. Fill it with locations
7301 of function arguments.
7302 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7303
68fca595
MP
73042014-01-30 Marek Polacek <polacek@redhat.com>
7305
7306 PR c/59940
7307 * c-typeck.c (build_function_call_vec): Use loc parameter.
7308 (convert_arguments): Add location parameter. Use it.
7309 (ep_convert_and_check): Likewise.
7310 (build_atomic_assign): Adjust convert_for_assignment call.
7311 (build_modify_expr): Likewise.
7312 (digest_init): Likewise.
7313 (c_finish_return): Likewise.
7314 (build_conditional_expr): Adjust ep_convert_and_check calls.
7315 (convert_for_assignment): Add rhs_loc parameter. Use it.
7316 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7317 calls.
7318
fa337f3a
RB
73192014-01-30 Richard Biener <rguenther@suse.de>
7320
7321 PR c/59905
7322 * c-typeck.c (build_function_call_vec): Do not replace calls
7323 to a function via an incompatible type with a runtime abort.
7324
b72271b9
BI
73252014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7326
7327 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7328 flag_enable_cilkplus with flag_cilkplus.
7329 (c_parser_direct_declarator_inner): Likewise.
7330 (c_parser_attribute_any_word): Likewise.
7331 (c_parser_attributes): Likewise.
7332 (c_parser_compound_statement): Likewise.
7333 (c_parser_statement_after_labels): Likewise.
7334 (c_parser_if_statement): Likewise.
7335 (c_parser_switch_statement): Likewise.
7336 (c_parser_do_statement): Likewise.
7337 (c_parser_for_statement): Likewise.
7338 (c_parser_unary_expression): Likewise.
7339 (c_parser_postfix_expression): Likewise.
7340 (c_parser_postfix_expression_after_primary): Likewise.
7341 (c_parser_postfix_expression_after_primary): Likewise.
7342 (c_parser_omp_clause_name): Likewise.
7343 (c_finish_omp_declare_simd): Likewise.
7344 (c_parser_cilk_verify_simd): Likewise.
7345 * c-typeck.c (build_array_ref): Likewise.
7346 (build_function_call_vec): Likewise.
7347 (convert_arguments): Likewise.
7348 (build_compound_expr): Likewise.
7349 (c_finish_return): Likewise.
7350 (c_finish_if_stmt): Likewise.
7351 (c_finish_loop): Likewise.
7352 (build_binary_op): Likewise.
7353
393e8e8b
MP
73542014-01-23 Marek Polacek <polacek@redhat.com>
7355
7356 PR c/59846
7357 * c-typeck.c (parser_build_binary_op): Use location instead of
7358 input_location.
7359 (build_binary_op): Pass location to shorten_compare.
7360
f04dda30
MP
73612014-01-23 Marek Polacek <polacek@redhat.com>
7362
7363 PR c/58346
7364 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7365 an empty aggregate.
7366
789eadcd
MP
73672014-01-23 Marek Polacek <polacek@redhat.com>
7368
7369 PR c/59871
7370 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7371 of a comma expression.
7372 (emit_side_effect_warnings): Likewise.
7373
40f14e9f
BI
73742014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7375
7376 PR c/59825
7377 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7378 function to use walk_tree and moved a lot of its functionality to
7379 expand_array_notations.
7380 (expand_array_notations): New function.
7381
74558dd9
BI
73822014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7383
7384 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7385 attribute an attribute without value.
7386
652fea39
JJ
73872014-01-23 Jakub Jelinek <jakub@redhat.com>
7388
7389 PR middle-end/58809
7390 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7391 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7392
f34f1c87
MP
73932014-01-22 Marek Polacek <polacek@redhat.com>
7394
7395 PR c/59891
7396 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7397 of remove_c_maybe_const_expr on op1 and op2.
7398
241f845a
JJ
73992014-01-15 Jakub Jelinek <jakub@redhat.com>
7400
7401 PR c/58943
7402 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7403 effects, preevaluate rhs using SAVE_EXPR first.
7404
9a74f20c
BI
74052014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7406
7407 PR c++/59631
7408 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7409 statements with if-elseif statements.
7410
96066ce1
MP
74112014-01-06 Marek Polacek <polacek@redhat.com>
7412
7413 PR c/57773
7414 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7415 defined bit-field types only in ISO C.
7416
23a5b65a
RS
74172014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7418
7419 Update copyright years
7420
f9030485
RS
74212014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7422
7423 * c-array-notation.c: Use the standard form for the copyright notice.
7424
41958c28
BI
74252013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7426
7427 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7428 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7429 field in parser is not empty. If not-empty, call the function
7430 c_parser_finish_omp_declare_simd.
7431 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7432 between SIMD-enabled functions and #pragma simd. Added new parameter.
7433 (c_parser_cilk_all_clauses): Modified the usage of the function
7434 c_parser_cilk_clause_vectorlength as mentioned above.
7435 (c_parser_cilk_simd_fn_vector_attrs): New function.
7436 (c_finish_cilk_simd_fn_tokens): Likewise.
7437 (is_cilkplus_vector_p): Likewise.
7438 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7439 "nomask," and "mask" strings in clause name.
7440 (c_parser_omp_all_clauses): Added 3 new case statements:
7441 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7442 PRAGMA_CILK_CLAUSE_NOMASK.
7443 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7444 check for vector attribute and if so call the function
7445 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7446 called the function c_finish_cilk_simd_fn_tokens.
7447 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7448 parser field is non-empty. If so, parse them as you would parse
7449 the omp declare simd pragma.
7450 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7451 Added a check when step is a parameter and flag it as error.
7452 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7453 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7454 pragma_omp_clause.
7455
cef0fd0e
TS
74562013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7457
7458 * c-parser.c (c_parser_omp_parallel): Fix description.
7459
12893402
BI
74602013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7461
7462 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7463 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7464 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7465 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7466
296674db
JM
74672013-12-04 Joseph Myers <joseph@codesourcery.com>
7468
7469 PR c/52023
7470 * c-parser.c (c_parser_alignas_specifier): Use
7471 c_sizeof_or_alignof_type instead of c_alignof.
7472 (c_parser_alignof_expression): Likewise, with min_alignof
7473 parameter depending on alignof spelling used.
7474
edd28054
MP
74752013-12-04 Marek Polacek <polacek@redhat.com>
7476
7477 PR c/54113
7478 * c-decl.c (start_function): Don't warn for missing prototype for
7479 inline functions.
7480
da0fc454
MP
74812013-12-03 Marek Polacek <polacek@redhat.com>
7482
7483 PR c/59351
7484 * c-decl.c (build_compound_literal): Allow compound literals with
7485 empty initial value.
7486
4c2ecab0
JM
74872013-12-02 Joseph Myers <joseph@codesourcery.com>
7488
7489 PR c/58235
7490 * c-typeck.c (build_modify_expr): Diagnose assignment to
7491 expression with array type.
7492
340baef7
JM
74932013-11-29 Joseph Myers <joseph@codesourcery.com>
7494
7495 PR c/42262
7496 * c-typeck.c (process_init_element): Do not treat a string as
7497 initializing a whole array when used with a designator for an
7498 individual element.
7499
6763b9f7
JM
75002013-11-29 Joseph Myers <joseph@codesourcery.com>
7501
7502 PR c/57574
7503 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7504 an inline function following a static declaration.
7505
e7bd1de1
JJ
75062013-11-28 Jakub Jelinek <jakub@redhat.com>
7507
7508 PR c/59310
7509 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7510 to p_name before calling c_parser_omp_teams instead of after.
7511 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7512 argument. Remove unused p_name variable.
7513
0136f8f0
AH
75142013-11-27 Aldy Hernandez <aldyh@redhat.com>
7515 Jakub Jelinek <jakub@redhat.com>
7516
7517 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7518 external_scope is NULL.
7519
241b71bb
TV
75202013-11-27 Tom de Vries <tom@codesourcery.com>
7521 Marc Glisse <marc.glisse@inria.fr>
7522
7523 PR c++/59032
7524 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7525
2fb9a547
AM
75262013-11-22 Andrew MacLeod <amacleod@redhat.com>
7527
7528 * c-typeck.c: Add required include files from gimple.h.
7529
8400e75e
DM
75302013-11-22 David Malcolm <dmalcolm@redhat.com>
7531
7532 * c-decl.c (define_label, shadow_tag_warned)
7533 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7534 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7535 (declspecs_add_type): Remove use of in_system_header macro.
7536 * c-parser.c (c_parser_unary_expression): Likewise.
7537 * c-typeck.c (store_init_value, process_init_element)
7538 (c_start_case): Likewise.
7539
7540 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7541 macro.
7542
7543 * c-parser.c (c_parser_set_source_position_from_token): Remove
7544 reference to in_system_header from comment.
7545
386b1f1f
RS
75462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7547
7548 * c-decl.c (grokdeclarator): Update comment to refer to
7549 tree_to_[su]hwi rather than tree_low_cst.
7550
ae7e9ddd
RS
75512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7552
7553 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7554 tree_to_uhwi throughout.
7555
9439e9a1
RS
75562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7557
7558 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7559 throughout.
7560
9541ffee
RS
75612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7562
7563 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7564 throughout.
7565
c02065fc
AH
75662013-11-15 Aldy Hernandez <aldyh@redhat.com>
7567
7568 * c-parser.c (c_parser_cilk_simd): New.
7569 (c_parser_cilk_verify_simd): New.
7570 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7571 (c_parser_omp_for_loop): Add case for NE_EXPR.
7572 Set c_break_label for CILK_SIMD.
7573 (c_parser_cilk_clause_vectorlength): New.
7574 (c_parser_cilk_clause_linear): New.
7575 (c_parser_cilk_clause_name): New.
7576 (c_parser_cilk_all_clauses): New.
7577 * c-typeck.c (build_unary_op): Pass location argument to
7578 readonly_error.
7579 (build_modify_expr): Same.
7580 (build_asm_expr): Same.
7581 (c_finish_bc_stmt): Error on break/continue in loops.
7582
18f429e2
AM
75832013-11-14 Andrew MacLeod <amacleod@redhat.com>
7584
7585 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7586
d8a2d370
DN
75872013-11-14 Diego Novillo <dnovillo@google.com>
7588
7589 * c-decl.c: Include print-tree.h.
7590 Include stor-layout.h.
7591 Include varasm.h.
7592 Include attribs.h.
7593 Include stringpool.h.
7594 * c-lang.c: Include fold-const.h.
7595 * c-parser.c: Include stringpool.h.
7596 Include attribs.h.
7597 Include stor-layout.h.
7598 Include varasm.h.
7599 Include trans-mem.h.
7600 * c-typeck.c: Include stor-layout.h.
7601 Include trans-mem.h.
7602 Include varasm.h.
7603 Include stmt.h.
7604
38b7bc7f
JM
76052013-11-13 Joseph Myers <joseph@codesourcery.com>
7606
7607 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7608 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7609 __auto_type.
7610 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7611 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7612 RID_AUTO_TYPE.
7613 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7614 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7615 (c_parser_declarator, c_parser_direct_declarator_inner)
7616 (c_parser_parameter_declaration, c_parser_type_name): All callers
7617 changed.
7618 (c_parser_declaration_or_fndef): Handle declarations with type
7619 determined from the initializer.
7620
45b0be94
AM
76212013-11-12 Andrew MacLeod <amacleod@redhat.com>
7622
18f429e2 7623 * c-typeck.c: Include gimplify.h.
45b0be94 7624
582d9b50
JM
76252013-11-12 Joseph Myers <joseph@codesourcery.com>
7626
7627 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7628 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7629 comment.
7630 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7631 or _Thread_local as appropriate in diagnostics.
7632 (build_null_declspecs): Initialize ret->thread_gnu_p.
7633 (declspecs_add_scspec): Handle either __thread or _Thread_local
7634 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7635 pedantic. Do not disallow _Thread_local extern and _Thread_local
7636 static.
7637
267bac10
JM
76382013-11-07 Joseph Myers <joseph@codesourcery.com>
7639 Andrew MacLeod <amacleod@redhat.com>
7640
7641 * c-aux-info.c (gen_type): Handle atomic qualifier.
7642 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7643 qualifiers when compating types.
7644 (shadow_tag_warned): Handle atomic_p in declspecs.
7645 (quals_from_declspecs): Likewise.
7646 (start_decl): Use c_type_promotes_to when promoting argument
7647 types.
7648 (grokdeclarator): Handle _Atomic.
7649 (get_parm_info): Diagnose any qualifier on "void" as only
7650 parameter.
7651 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7652 comparing types. Use c_type_promotes_to when promoting argument
7653 types.
7654 (finish_function): Use c_type_promotes_to when promoting argument
7655 types.
7656 (build_null_declspecs): Handle atomic_p in declspecs.
7657 (declspecs_add_qual): Handle RID_ATOMIC.
7658 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7659 (c_token_starts_declspecs): Handle RID_ATOMIC.
7660 (c_parser_declspecs): Handle atomic type specifiers and
7661 qualifiers.
7662 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7663 from types of expressions with atomic type.
7664 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7665 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7666 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7667 (c_parser_statement_after_labels, c_parser_switch_statement)
7668 (c_parser_for_statement, c_parser_expr_no_commas)
7669 (c_parser_conditional_expression, c_parser_binary_expression)
7670 (c_parser_cast_expression, c_parser_unary_expression)
7671 (c_parser_postfix_expression)
7672 (c_parser_postfix_expression_after_primary, c_parser_expression):
7673 Use convert_lvalue_to_rvalue.
7674 (c_parser_expression_conv, c_parser_expr_list): Document
7675 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7676 (c_parser_objc_synchronized_statement): Use
7677 convert_lvalue_to_rvalue.
7678 (c_parser_objc_selector): Handle RID_ATOMIC.
7679 (c_parser_objc_receiver, c_parser_array_notation): Use
7680 convert_lvalue_to_rvalue.
7681 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7682 _Atomic (type-name).
7683 (struct c_declspecs): Add atomic_p field.
7684 (convert_lvalue_to_rvalue): Declare.
7685 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7686 corresponding atomic types.
7687 (qualify_type): Don't add _Atomic qualifiers from second argument.
7688 (comp_target_types): Do not allow _Atomic mismatches.
7689 (type_lists_compatible_p): Do not remove atomic qualifiers when
7690 comparing types.
7691 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7692 (build_atomic_assign): New functions.
7693 (build_unary_op): Use build_atomic_assign for atomic increment and
7694 decrement.
7695 (build_conditional_expr): Do not treat _Atomic void as a qualified
7696 version of void.
7697 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7698 (find_anonymous_field_with_type, convert_to_anonymous_field)
7699 (convert_for_assignment): Do not remove atomic qualifiers when
7700 comparing types.
7701 (digest_init): Do not accept initialization of arrays of atomic
7702 elements by string constants.
7703 (build_asm_expr): Use convert_lvalue_to_rvalue.
7704 (build_binary_op): Do not treat _Atomic void as a qualified
7705 version of void.
7706
0c249d4b
DD
77072013-11-06 DJ Delorie <dj@redhat.com>
7708
7709 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7710 both explicit and builtin, print the location of the explicit one.
7711
6d7f7e0a
TB
77122013-11-05 Tobias Burnus <burnus@net-b.de>
7713
7714 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7715 c_parser_omp_distribute, c_parser_omp_teams,
7716 c_parser_omp_target, c_parser_omp_declare): Handle
7717 -fopenmp-simd.
7718
b906f4ca
MP
77192013-11-03 Marek Polacek <polacek@redhat.com>
7720
7721 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7722
ee1d5a02
JJ
77232013-11-01 Jakub Jelinek <jakub@redhat.com>
7724
7725 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7726 check_dup_generic at the end, unless remove is true.
7727 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7728 remove = true;.
7729 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7730
5a9785fb
JJ
77312013-10-31 Jakub Jelinek <jakub@redhat.com>
7732
7733 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7734 with decl that is not pointer nor array.
7735
939b37da
BI
77362013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7737
7738 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7739 a spawning function is found.
7740 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7741 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7742 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7743 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7744 case.
7745 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7746 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7747 expr.
7748 (c_finish_return): Added a check to reject _Cilk_spawn in return
7749 expression.
7750 (build_cilk_spawn): New function.
7751 (build_cilk_sync): Likewise.
7752 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7753
d4af74d4
TB
77542013-10-27 Tobias Burnus <burnus@net-b.de>
7755
7756 PR other/33426
7757 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7758 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7759 (c_parser_statement_after_labels): Update calls.
7760
d73749df 77612013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7762
7763 PR other/33426
7764 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7765 Handle PRAGMA_IVDEP.
7766 (c_parser_statement_after_labels): Update call.
7767
f28aa681
MP
77682013-10-24 Marek Polacek <polacek@redhat.com>
7769
7770 * c-parser.c (c_parser_struct_declaration): Add a comment.
7771 (c_parser_declarator): Don't allow _Alignas here.
7772
0645c1a2
AM
77732013-10-17 Andrew MacLeod <amacleod@redhat.com>
7774
7775 * c-parser.c: Include omp-low.h.
7776 * c-typeck.c: Likewise.
7777
568a31f2
MP
77782013-10-17 Marek Polacek <polacek@redhat.com>
7779
7780 PR c/58267
7781 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7782 Document syntax of the array-declarator.
7783 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7784 are not permitted.
7785 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7786 (c_parser_struct_declaration): Likewise.
7787 (c_parser_declarator): Likewise.
7788 (c_parser_direct_declarator_inner): Likewise.
7789 (c_parser_parameter_declaration): Likewise.
7790 (c_parser_type_name): Likewise.
7791
acf0174b
JJ
77922013-10-11 Jakub Jelinek <jakub@redhat.com>
7793
7794 * c-lang.h (current_omp_declare_target_attribute): New extern
7795 decl.
7796 * c-parser.c: Include c-lang.h.
7797 (struct c_parser): Change tokens to c_token *.
7798 Add tokens_buf field. Change tokens_avail type to unsigned int.
7799 (c_parser_consume_token): If parser->tokens isn't
7800 &parser->tokens_buf[0], increment parser->tokens.
7801 (c_parser_consume_pragma): Likewise.
7802 (enum pragma_context): Add pragma_struct and pragma_param.
7803 (c_parser_external_declaration): Adjust
7804 c_parser_declaration_or_fndef caller.
7805 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7806 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7807 Adjust recursive call.
7808 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7809 of pragma_external.
7810 (c_parser_parameter_declaration): Use pragma_param instead of
7811 pragma_external.
7812 (c_parser_compound_statement_nostart, c_parser_label,
7813 c_parser_for_statement): Adjust
7814 c_parser_declaration_or_fndef callers.
7815 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7816 it through to c_parser_conditional_expression.
7817 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7818 pass it through to c_parser_binary_expression. Adjust recursive
7819 call.
7820 (c_parser_binary_expression): Remove prec argument, add
7821 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7822 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7823 binop matches it, use build2 instead of parser_build_binary_op.
7824 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7825 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7826 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7827 Handle pragma_struct and pragma_param the same as pragma_external.
7828 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7829 (c_parser_omp_variable_list): Parse array sections for
7830 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7831 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7832 (c_parser_omp_clause_reduction): Handle user defined reductions.
7833 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7834 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7835 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7836 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7837 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7838 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7839 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7840 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7841 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7842 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7843 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7844 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7845 (c_parser_omp_for_loop): Add CODE argument, pass it through
7846 to c_finish_omp_for. Change last argument to cclauses,
7847 and adjust uses to grab parallel clauses from the array of all
7848 the split clauses. Adjust c_parser_binary_expression,
7849 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7850 (omp_split_clauses): New function.
7851 (c_parser_omp_simd): New function.
7852 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7853 Allow the function to be called also when parsing combined constructs,
7854 and call c_parser_omp_simd when parsing for simd.
7855 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7856 #pragma omp section, require exactly one structured-block instead of
7857 sequence of statements.
7858 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7859 Allow the function to be called also when parsing combined constructs.
7860 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7861 Allow the function to be called also when parsing combined
7862 constructs.
7863 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7864 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7865 c_parser_omp_teams, c_parser_omp_target_data,
7866 c_parser_omp_target_update, c_parser_omp_target,
7867 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7868 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7869 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7870 (c_parser_omp_construct): Add p_name and mask vars. Handle
7871 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7872 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7873 and c_parser_omp_sections callers.
7874 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7875 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7876 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7877 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7878 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7879 OMP_CLAUSE_DEPEND.
7880 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7881 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7882 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7883 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7884 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7885 * c-typeck.c: Include tree-inline.h.
7886 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7887 handle_omp_array_sections_1, handle_omp_array_sections,
7888 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7889 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7890 user defined reductions.
7891 (c_tree_equal): New function.
7892 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7893 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7894 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7895 c_check_omp_declare_reduction_r): New prototypes.
7896 * c-decl.c (current_omp_declare_target_attribute): New variable.
7897 (c_decl_attributes): New function.
7898 (start_decl, start_function): Use it instead of decl_attributes.
7899 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7900 c_omp_reduction_decl, c_omp_reduction_lookup,
7901 c_check_omp_declare_reduction_r): New functions.
7902
0a6c2227
TT
79032013-09-25 Tom Tromey <tromey@redhat.com>
7904
7905 * Make-lang.in (c/gccspec.o): Remove.
7906 (CFLAGS-c/gccspec.o): New variable.
7907 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7908 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7909 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7910
f3bc55f0
TT
79112013-09-25 Tom Tromey <tromey@redhat.com>
7912
7913 * Make-lang.in (c/gccspec.o): Don't use subshell.
7914
a24d975c
MP
79152013-09-18 Marek Polacek <polacek@redhat.com>
7916
7917 PR sanitize/58443
7918 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7919 Remove unnecessary check.
7920
ce6923c5
MP
79212013-09-18 Marek Polacek <polacek@redhat.com>
7922
7923 PR sanitizer/58411
7924 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7925 no_sanitize_undefined attribute.
7926
a1e51df9
KT
79272013-09-13 Kai Tietz <ktietz@redhat.com>
7928
7929 PR target/57848
7930 * c-decl.c (c_builtin_function_ext_scope): Remove
7931 wrong assumption that it is never called on prexisting
7932 symbol.
7933
0af94e6f
JR
79342013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7935
7936 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7937
20059c8b
GDR
79382013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7939
7940 * c-objc-common.c (c_tree_printer): Tidy.
7941
de5a5fa1
MP
79422013-08-30 Marek Polacek <polacek@redhat.com>
7943
7944 * c-typeck.c (build_binary_op): Add division by zero and shift
7945 instrumentation.
7946
2531a1d9 79472013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7948 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7949
6e2bcc98 7950 PR c/35649
2531a1d9
JR
7951 * c-typeck.c (c_common_type): Prefer double_type_node over
7952 other REAL_TYPE types with the same precision.
7953 (convert_arguments): Likewise.
7954
025311c4
GDR
79552013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7956
7957 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7958 (c_initialize_diagnostics): Call a destructor for the early printer.
7959
da6ca2b5
GDR
79602013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7961
7962 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7963 printer initialization.
7964
318cda85 79652013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7966
318cda85
BI
7967 PR c/57490
7968 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7969 check for truth values.
7970 (expand_array_notation_exprs): Added truth values case. Removed an
7971 unwanted else. Added for-loop to walk through subtrees in default
7972 case.
7973
b066401f
GDR
79742013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7975
7976 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7977
fb48aadc
JM
79782013-07-23 Joseph Myers <joseph@codesourcery.com>
7979
7980 * c-parser.c (struct c_generic_association): Fix typo.
7981
433cc7b0
TT
79822013-07-23 Tom Tromey <tromey@redhat.com>
7983 Joseph Myers <joseph@codesourcery.com>
7984
7985 * c-parser.c (struct c_generic_association): New.
7986 (c_generic_association_d): New typedef.
7987 (c_parser_generic_selection): New function.
7988 (c_parser_postfix_expression): Handle RID_GENERIC.
7989
26d40c3d
JM
79902013-07-13 Jason Merrill <jason@redhat.com>
7991
7992 PR c++/57793
7993 * c-decl.c (finish_struct): Check for too-large class.
7994
ecdbd01a 79952013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7996
7997 PR c/57821
7998 * c-typeck.c (set_init_index): When folding, check for index overflow.
7999
1141ed3f
BI
80002013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8001
8002 * c-parser.c (c_parser_array_notation): Removed rejection of array
8003 notations in an array of function pointers.
8004
713b46fa
BI
80052013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8006
8007 * c-array-notation.c (make_triplet_val_inv): New function.
8008 (create_cmp_incr): Likewise.
8009 (create_array_refs): Likewise.
8010 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8011 Also modularized common parts between functions and called the function.
8012 (build_array_notation_expr): Likewise.
8013 (fix_conditional_array_notations_1): Likewise.
8014 (fix_array_notation_expr): Likewise.
8015 (fix_array_notation_call_expr): Likewise.
8016
92f20202
MP
80172013-06-18 Marek Polacek <polacek@redhat.com>
8018
8019 PR c/57630
8020 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8021
73a23b06
BI
80222013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8023
8024 * c-array-notation.c (build_array_notation_expr): Reject array notation
8025 mismatch between LHS and RHS even inside a call_expr. Also, removed
8026 a couple while statements that were dead code.
8027
00b8517d
BI
80282013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8029
8030 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8031 excessive precision expressions in function parameters. Also removed
8032 couple unwanted while statements.
8033
1509bdda
BI
80342013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8035
8036 * c-array-notation.c (expand_array_notation_exprs): Added
8037 ARRAY_NOTATION_REF case.
ab20d992 8038
d60f1706
BI
80392013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8040
8041 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8042 function to c-family/array-notation-common.c.
8043 (is_cilkplus_reduce_builtin): Likewise.
8044 (find_rank): Likewise.
8045 (extract_array_notation_exprs): Likewise.
8046 (replace_array_notations): Likewise.
8047 (find_inv_trees): Likewise.
8048 (replace_inv_trees): Likewise.
8049 (contains_array_notation_expr): Likewise.
8050 (find_correct_array_notation_type): Likewise.
8051 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8052 (struct inv_list): Moved this to c-family/array-notation-common.c.
8053 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8054
6d6efbb3
BI
80552013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8056
8057 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8058 reduction functions outside the for-loop. Added a check if the fundecl
8059 is non-NULL. Finally, removed an unwanted if-statement, and made the
8060 body unconditional.
8061
25c22937
BI
80622013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8063
8064 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8065 condition of the if-statement matches the rank of else-block and then-
8066 block when array notations are used.
8067 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8068 expression after the entire function body is parsed.
8069 (c_parser_expr_no_commas): Delayed creating array notation expressions
8070 to the end of function parsing.
8071 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8072 whole if-statement instead of just the condition.
ab20d992 8073 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8074
edd25645
BI
80752013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8076
8077 PR c/57474
8078 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8079 array to NULL_TREE if they are unused. Also added a check for the
8080 field to be NULL before its fields are used in future.
ab20d992 8081
065ce7f1
RO
80822013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8083
8084 PR bootstrap/57450
8085 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8086 (build_array_notation_expr): Likewise.
8087
36536d79
BI
80882013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8089
8090 * c-typeck.c (build_array_ref): Added a check to see if array's
8091 index is greater than one. If true, then emit an error.
8092 (build_function_call_vec): Exclude error reporting and checking
8093 for builtin array-notation functions.
8094 (convert_arguments): Likewise.
8095 (c_finish_return): Added a check for array notations as a return
8096 expression. If true, then emit an error.
8097 (c_finish_loop): Added a check for array notations in a loop
8098 condition. If true then emit an error.
8099 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8100 (build_binary_op): Added a check for array notation expr inside
8101 op1 and op0. If present, we call another function to find correct
8102 type.
8103 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8104 * c-parser.c (c_parser_compound_statement): Check if array
8105 notation code is used in tree, if so, then transform them into
8106 appropriate C code.
8107 (c_parser_expr_no_commas): Check if array notation is used in LHS
8108 or RHS, if so, then build array notation expression instead of
8109 regular modify.
8110 (c_parser_postfix_expression_after_primary): Added a check for
8111 colon(s) after square braces, if so then handle it like an array
8112 notation. Also, break up array notations in unary op if found.
8113 (c_parser_direct_declarator_inner): Added a check for array
8114 notation.
8115 (c_parser_compound_statement): Added a check for array notation in
8116 a stmt. If one is present, then expand array notation expr.
8117 (c_parser_if_statement): Likewise.
8118 (c_parser_switch_statement): Added a check for array notations in
8119 a switch statement's condition. If true, then output an error.
8120 (c_parser_while_statement): Similarly, but for a while.
8121 (c_parser_do_statement): Similarly, but for a do-while.
8122 (c_parser_for_statement): Similarly, but for a for-loop.
8123 (c_parser_unary_expression): Check if array notation is used in a
8124 pre-increment or pre-decrement expression. If true, then expand
8125 them.
8126 (c_parser_array_notation): New function.
8127 * c-array-notation.c: New file.
8128 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8129
cd192ccc
MS
81302013-05-23 Mike Stump <mikestump@comcast.net>
8131
8132 * c-typeck.c (convert_for_assignment): Handle references to memory
8133 spaces better.
8134
427b248d
JM
81352013-05-16 Jason Merrill <jason@redhat.com>
8136
8137 * Make-lang.in (cc1$(exeext)): Use link mutex.
8138
44d90fe1
PC
81392013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8140
8141 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8142 to simply use OPT_Wpointer_arith.
8143 (build_unary_op): Likewise.
8144
4e7d7b3d
JJ
81452013-04-03 Jakub Jelinek <jakub@redhat.com>
8146
8147 PR c/19449
8148 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8149 argument. If set, or it temporarily for parsing of the first
8150 argument into force_folding_builtin_constant_p.
8151 (c_parser_postfix_expression): Adjust callers.
8152
839b422f
RB
81532013-03-21 Richard Biener <rguenther@suse.de>
8154
8155 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8156 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8157
2ee028f1
MP
81582013-02-12 Marek Polacek <polacek@redhat.com>
8159
8160 PR c/44938
8161 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8162 origtypes to NULL.
8163
8824edff
JJ
81642013-01-24 Jakub Jelinek <jakub@redhat.com>
8165
8166 PR c/56078
8167 * c-typeck.c (set_nonincremental_init_from_string): If
8168 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8169 returned false.
8170 (process_init_element): Likewise.
8171
eadd3d0d
JJ
81722012-12-20 Jakub Jelinek <jakub@redhat.com>
8173
8174 PR c++/55619
8175 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8176 argument, don't call default_function_array_conversion
8177 nor c_fully_fold here.
8178 (c_parser_asm_statement): Adjust callers.
8179 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8180 and outputs here, and call default_function_array_conversion
8181 on inputs that don't need to be addressable.
8182
f8a93a2e
JJ
81832012-12-18 Jakub Jelinek <jakub@redhat.com>
8184
8185 PR c/39464
8186 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8187 warning require that both c_common_unsigned_type as well as
8188 c_common_signed_type is the same for both mvl and mvr types.
8189
9771b263
DN
81902012-11-16 Diego Novillo <dnovillo@google.com>
8191
8192 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8193
8194 * c-common.c: Use new vec API in vec.h.
8195 * c-common.h: Likewise.
8196 * c-gimplify.c: Likewise.
8197 * c-pragma.c: Likewise.
8198 * c-pretty-print.c: Likewise.
8199 * c-pretty-print.h: Likewise.
8200 * c-semantics.c: Likewise.
8201 * c-decl.c: Likewise.
8202 * c-parser.c: Likewise.
8203 * c-tree.h: Likewise.
8204 * c-typeck.c: Likewise.
8205
880661a4
JW
82062012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8207
8208 PR c++/54930
8209 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8210
077d1abe
MLI
82112012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8212
8213 PR c/53066
8214 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8215 shadows a function, unless the variable is a function or a
8216 pointer-to-function.
8217
3a785c97
JJ
82182012-10-12 Jakub Jelinek <jakub@redhat.com>
8219
8220 PR c/54381
8221 * c-parser.c (struct c_tree_loc_pair): Removed.
8222 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8223 add location_t * and tree * arguments, fill in array of 3
8224 sizeof_arg trees and corresponding locs.
8225 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8226 c_parser_expr_list callers.
8227 (c_parser_postfix_expression_after_primary): Likewise. Pass
8228 array of 3 sizeof_arg trees and locs (corresponding to first
8229 3 arguments) to sizeof_pointer_memaccess_warning.
8230
703c8606
LC
82312012-10-09 Lawrence Crowl <crowl@google.com>
8232
8233 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8234 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8235 hash table.
8236
5d9de0d0
PC
82372012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8238
8239 PR c++/54194
8240 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8241 call.
8242
a212e43f
MG
82432012-10-09 Marc Glisse <marc.glisse@inria.fr>
8244
8245 PR c++/54427
8246 * c-typeck.c: Include c-common.h.
8247 (enum stv_conv): Moved to c-common.h.
8248 (scalar_to_vector): Moved to c-common.c.
8249 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8250 * Make-lang.in: c-typeck.c depends on c-common.h.
8251
3b78de56
AC
82522012-10-04 Arnaud Charlet <charlet@adacore.com>
8253
8254 * c-decl.c (c_write_global_declarations): Fix handling of
8255 -fdump-ada-spec*.
8256
78c60e3d
SS
82572012-09-30 Sharad Singhai <singhai@google.com>
8258
8259 * c-decl.c (c_write_global_declarations): Use a different method
8260 to determine if the dump has ben initialized.
8261
9f33203d
JM
82622012-09-14 Joseph Myers <joseph@codesourcery.com>
8263
8264 PR c/54552
8265 * c-typeck.c (c_cast_expr): When casting to a type requiring
8266 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8267 c_fully_fold first.
8268
a27d595d
JM
82692012-09-14 Joseph Myers <joseph@codesourcery.com>
8270
8271 PR c/54103
8272 * c-typeck.c (build_unary_op): Pass original argument of
8273 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8274 any C_MAYBE_CONST_EXPR, if it has integer operands.
8275 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8276 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8277 to c_objc_common_truthvalue_conversion, then remove any
8278 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8279 c_objc_common_truthvalue_conversion not
8280 c_common_truthvalue_conversion.
8281 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8282 call note_integer_operands for arguments with integer operands
8283 that are not integer constants.
8284
9feb29df
JJ
82852012-09-13 Jakub Jelinek <jakub@redhat.com>
8286
8287 PR c/54559
8288 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8289 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8290
d409320c
JJ
82912012-08-31 Jakub Jelinek <jakub@redhat.com>
8292
8293 PR c/54428
8294 * c-convert.c (convert): Don't call fold_convert_loc if
8295 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8296 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8297 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8298
6265d07c
JJ
82992012-08-24 Jakub Jelinek <jakub@redhat.com>
8300
8301 PR c/54355
8302 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8303 for nested and empty_ok arguments in the call to
8304 c_parser_declaration_or_fndef.
8305
1a4049e7
JJ
83062012-08-17 Jakub Jelinek <jakub@redhat.com>
8307
8308 * c-tree.h (c_last_sizeof_arg): Declare.
8309 * c-parser.c (struct c_tree_loc_pair): New type.
8310 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8311 non-NULL.
8312 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8313 (c_parser_postfix_expression_after_primary): Likewise. Call
8314 sizeof_pointer_memaccess_warning if needed.
8315 (sizeof_ptr_memacc_comptypes): New function.
8316 * c-typeck.c (c_last_sizeof_arg): New global variable.
8317 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8318
0229aee9
UB
83192012-07-24 Uros Bizjak <ubizjak@gmail.com>
8320
8321 * c-lang.h (lang_decl): Add variable_size GTY option.
8322
7ee2468b
SB
83232012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8324
8325 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8326 * Make-lang.in: Fix dependencies.
8327
d4a10d0a
SB
83282012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8329
8330 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8331 and add language Makefile hooks.
8332 * config-lang.in: New file.
8333 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8334 add the required "normal" config-lang.in rules.
8335 * c-lang.h: Moved from gcc/ to here.
8336 * c-tree.h: Likewise.
8337 * c-objc-common.c: Likewise.
8338 * c-objc-common.h: Likewise.
8339 * c-typeck.c: Likewise.
8340 * c-convert.c: Likewise.
8341 * c-lang.c: Likewise.
8342 * c-aux-info.c: Likewise.
8343 * c-errors.c: Likewise.
8344 * gccspec.c: Likewise.
8345 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8346 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8347\f
877e3c2a 8348Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8349
8350Copying and distribution of this file, with or without modification,
8351are permitted in any medium without royalty provided the copyright
8352notice and this notice are preserved.