]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
compiler: load LHS subexpressions of op= assignment only once
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
702bd11f
GA
12022-05-16 Martin Liska <mliska@suse.cz>
2
3 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
4
49ace834
GA
52022-05-12 Jakub Jelinek <jakub@redhat.com>
6
7 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
8 if flag_openmp.
9 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
10 in postfix expressions.
11 (c_parser_omp_variable_list): Handle omp_all_memory in depend
12 clause.
13 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
14 keyword in depend clause as null_pointer_node, diagnose invalid
15 uses.
16
bd022ff9
GA
172022-05-09 Martin Liska <mliska@suse.cz>
18
19 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
20 macros.
21 (c_parser_binary_expression): Likewise.
22
a1947c92
GA
232022-05-07 Marek Polacek <polacek@redhat.com>
24
25 PR c++/101833
26 PR c++/47634
27 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
28
405eda0d
GA
292022-04-08 Jakub Jelinek <jakub@redhat.com>
30
31 PR c/105149
32 * c-typeck.cc (c_build_va_arg): Reject function types.
33
a2287813
GA
342022-03-22 Marek Polacek <polacek@redhat.com>
35
36 PR c/82283
37 PR c/84685
38 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
39 (start_init): Set it.
40 (finish_init): Restore constructor_designated.
41 (push_init_level): Set constructor_designated to the value of
42 constructor_designated in the upper constructor_stack.
43
57eeedda
GA
442022-03-12 Thomas Schwinge <thomas@codesourcery.com>
45
46 PR other/65095
47 * c-typeck.cc (handle_omp_array_sections_1)
48 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
49 instead of 'c_omp_map_clause_name'.
50
8cc4f9cd
GA
512022-03-09 Joseph Myers <joseph@codesourcery.com>
52
53 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
54 differently from earlier standards for unprototyped function type
55 compatibility.
56
572022-03-09 Jakub Jelinek <jakub@redhat.com>
58
59 PR c/104711
60 * c-fold.cc (c_fully_fold_internal): Don't emit
61 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
62 * c-typeck.cc (build_binary_op): Likewise.
63
e6533e2e
GA
642022-03-07 Jakub Jelinek <jakub@redhat.com>
65
66 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
67 literal.
68
4bf3bac1
GA
692022-02-23 Richard Biener <rguenther@suse.de>
70
71 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
72 SSA names without definition.
73 (c_parser_gimple_declaration): Handle pointer typed SSA names.
74
0bdb0498
GA
752022-02-17 Jakub Jelinek <jakub@redhat.com>
76
77 PR c/104532
78 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
79 convert_lvalue_to_rvalue and build_indirect_ref instead of
80 build_simple_mem_ref.
81
e8d68f0a
GA
822022-02-11 Richard Biener <rguenther@suse.de>
83
84 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
85 VEC_COND_EXPRs.
86
a645583d
GA
872022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
88
89 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
90 clause.
91 (c_parser_omp_variable_list): Handle array sections.
92 (c_parser_omp_clause_has_device_addr): Added.
93 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
94 case.
95 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
96 OMP_CLAUSE_MASK.
97 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
98 (c_finish_omp_clauses): Handle array sections.
99
3adf509f
GA
1002022-02-09 Jakub Jelinek <jakub@redhat.com>
101
102 PR c/104427
103 * c-parser.cc (c_parser_postfix_expression)
104 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
105 instead of build1_loc to build PAREN_EXPR.
106 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
107 * c-fold.cc (c_fully_fold_internal): Likewise.
108
fc829782
GA
1092022-01-17 Martin Liska <mliska@suse.cz>
110
111 * Make-lang.in: Rename .c names to .cc.
112 * c-convert.cc: Likewise.
113 * c-decl.cc (struct lang_identifier): Likewise.
114 (pop_scope): Likewise.
115 (finish_decl): Likewise.
116 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
117 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
118 * c-parser.h (GCC_C_PARSER_H): Likewise.
119 * c-tree.h (c_keyword_starts_typename): Likewise.
120 (finish_declspecs): Likewise.
121 (c_get_alias_set): Likewise.
122 (enum c_oracle_request): Likewise.
123 (tag_exists_p): Likewise.
124 (set_c_expr_source_range): Likewise.
125 * c-typeck.cc (c_common_type): Likewise.
126 (c_finish_omp_clauses): Likewise.
127 * config-lang.in: Likewise.
128
1292022-01-17 Martin Liska <mliska@suse.cz>
130
131 * c-aux-info.c: Moved to...
132 * c-aux-info.cc: ...here.
133 * c-convert.c: Moved to...
134 * c-convert.cc: ...here.
135 * c-decl.c: Moved to...
136 * c-decl.cc: ...here.
137 * c-errors.c: Moved to...
138 * c-errors.cc: ...here.
139 * c-fold.c: Moved to...
140 * c-fold.cc: ...here.
141 * c-lang.c: Moved to...
142 * c-lang.cc: ...here.
143 * c-objc-common.c: Moved to...
144 * c-objc-common.cc: ...here.
145 * c-parser.c: Moved to...
146 * c-parser.cc: ...here.
147 * c-typeck.c: Moved to...
148 * c-typeck.cc: ...here.
149 * gccspec.c: Moved to...
150 * gccspec.cc: ...here.
151 * gimple-parser.c: Moved to...
152 * gimple-parser.cc: ...here.
153
1542022-01-17 Andrew Stubbs <ams@codesourcery.com>
155
156 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
157
617db51d
GA
1582022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
159
160 PR c++/103705
161 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
162 outer node for ARRAY_REFs.
163
62eb5308
GA
1642022-01-01 Jakub Jelinek <jakub@redhat.com>
165
166 PR objc/103639
167 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
168 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
169
2554e2da
GA
1702021-12-17 Marek Polacek <polacek@redhat.com>
171
172 PR c/103649
173 * c-decl.c (c_warn_unused_attributes): Don't warn for
174 attribute_ignored_p.
175 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
176 arguments when the attribute is ignored.
177
9c6586bc
GA
1782021-12-14 Jakub Jelinek <jakub@redhat.com>
179
180 PR c/103587
181 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
182 consume the pragma and silently skip to the pragma eol.
183
c8dcf64b
GA
1842021-12-12 Jonathan Wakely <jwakely@redhat.com>
185
186 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
187 * c-parser.c: Likewise.
188
4b4839e3
GA
1892021-12-09 Jakub Jelinek <jakub@redhat.com>
190
191 PR pch/71934
192 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
193 to resort_data.new_value.
194
641ff219
GA
1952021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
196
197 * c-parser.c (struct omp_dim): New struct type for use inside
198 c_parser_omp_variable_list.
199 (c_parser_omp_variable_list): Allow multiple levels of array and
200 component accesses in array section base-pointer expression.
201 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
202 c_parser_omp_var_list_parens.
203 (c_parser_omp_clause_from): Likewise.
204 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
205 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
206 POINTER_PLUS_EXPR.
207 (c_finish_omp_clauses): Extend allowed ranged of expressions
208 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
209
2102021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
211
212 PR middle-end/92120
213 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
214 call to c_parser_omp_variable_list to 'true'.
215 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
216 array base handling.
217 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
218
c177e806
GA
2192021-11-30 Thomas Schwinge <thomas@codesourcery.com>
220
221 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
222 orphan loop" checking.
223
2242021-11-30 Cesar Philippidis <cesar@codesourcery.com>
225 Thomas Schwinge <thomas@codesourcery.com>
226
227 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
228 OpenACC gang reductions.
229
2302021-11-30 Richard Biener <rguenther@suse.de>
231
232 * gimple-parser.c (c_parser_gimple_postfix_expression):
233 avoid unreachable code after break.
234
87cd82c8
GA
2352021-11-29 Eric Gallager <egallager@gcc.gnu.org>
236
237 PR other/103021
238 * Make-lang.in: Use ETAGS variable in TAGS target.
239
2402021-11-29 Richard Biener <rguenther@suse.de>
241
242 * c-typeck.c (c_tree_equal): Remove unreachable return.
243 * c-parser.c (get_matching_symbol): Likewise.
244
e1d43592
GA
2452021-11-23 Jakub Jelinek <jakub@redhat.com>
246
247 * c-typeck.c (c_clone_omp_udr): Don't initialize
248 id.transform_lang_insert_block.
249
9c077398
GA
2502021-11-19 Martin Sebor <msebor@redhat.com>
251
252 PR c++/33925
253 PR c/102867
254 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
255 code resulting from macro expansion.
256
2572021-11-19 Martin Liska <mliska@suse.cz>
258
259 Revert:
260 2021-11-19 Martin Liska <mliska@suse.cz>
261
262 * c-parser.c (add_debug_begin_stmt): Use option directly.
263
483092d3
GA
2642021-11-18 Matthias Kretz <m.kretz@gsi.de>
265
266 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
267 * c-parser.c (c_parser_postfix_expression): Likewise.
268
2692021-11-18 Martin Liska <mliska@suse.cz>
270
271 * c-parser.c (add_debug_begin_stmt): Use option directly.
272
280d2838
GA
2732021-11-17 Martin Sebor <msebor@redhat.com>
274
275 PR c/101702
276 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
277 bounds before deciding if they're constant.
278
e2b57363
GA
2792021-11-15 Jakub Jelinek <jakub@redhat.com>
280
281 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
282 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
283
b39265d4
GA
2842021-11-11 Jakub Jelinek <jakub@redhat.com>
285
286 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
287 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
288 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
289 OMP_CLAUSE_NUM_TEAMS_EXPR.
290 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
291 combined target teams even lower-bound expression.
292
2932021-11-11 Richard Biener <rguenther@suse.de>
294
295 * gimple-parser.c: Shuffle bitmap.h include.
296
18ae471f
GA
2972021-11-03 Joseph Myers <joseph@codesourcery.com>
298
299 PR c/103031
300 * c-convert.c (c_convert): New function, based on convert.
301 (convert): Make into wrapper of c_convert.
302 (convert_init): New function.
303 * c-typeck.c (enum impl_conv): Add ic_init_const.
304 (convert_for_assignment): Handle ic_init_const like ic_init. Add
305 new argument to convert_and_check call.
306 (digest_init): Pass ic_init_const to convert_for_assignment for
307 initializers required to be constant.
308
b4df2dd3
GA
3092021-11-02 Richard Sandiford <richard.sandiford@arm.com>
310
311 * c-tree.h (c_simulate_record_decl): Declare.
312 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
313 * c-decl.c (c_simulate_record_decl): New function.
314
c2bd5d8a
GA
3152021-10-22 Eric Gallager <egallager@gcc.gnu.org>
316
317 PR other/102663
318 * Make-lang.in: Add dummy c.install-dvi target.
319
93d183a5
GA
3202021-10-15 Richard Biener <rguenther@suse.de>
321
322 PR c/102763
323 * gimple-parser.c
324 (c_parser_gimple_postfix_expression_after_primary): Check
325 for a pointer do be dereferenced by ->.
326
5d5885c9
GA
3272021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
328
329 * c-parser.c (c_finish_omp_declare_variant): Change call from
330 c_omp_check_context_selector to omp_check_context_selector. Change
331 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
332
c9db17b8
GA
3332021-10-09 Jakub Jelinek <jakub@redhat.com>
334
335 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
336 (c_parser_omp_scan_loop_body): Use it.
337 (c_parser_omp_sections_scope): Likewise.
338
50e20ee6
GA
3392021-10-07 Richard Biener <rguenther@suse.de>
340
341 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
342
bb6194e0
GA
3432021-10-05 Richard Biener <rguenther@suse.de>
344
345 PR c/102605
346 * gimple-parser.c (c_parser_gimple_postfix_expression):
347 Accept more address _Literals.
348
da9c5f78
GA
3492021-10-04 Marek Polacek <polacek@redhat.com>
350
351 PR c++/97573
352 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
353
9d116bcc
GA
3542021-10-01 Martin Sebor <msebor@redhat.com>
355
356 PR c/102103
357 * c-typeck.c (maybe_warn_for_null_address): New function.
358 (build_binary_op): Call it.
359
3602021-10-01 Jakub Jelinek <jakub@redhat.com>
361 Richard Biener <rguenther@suse.de>
362
363 PR sanitizer/102515
364 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
365 for division even for SANITIZE_SI_OVERFLOW.
366
3672021-10-01 Jakub Jelinek <jakub@redhat.com>
368
369 * c-parser.c (c_parser_omp_clause_order): Set
370 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
371
fd133479
GA
3722021-09-28 Andrew Pinski <apinski@marvell.com>
373
374 PR c/32122
375 * c-parser.c (c_parser_statement_after_labels): Pass
376 the c_expr instead of the tree to c_finish_goto_ptr.
377 * c-typeck.c (c_finish_goto_ptr): Change the second
378 argument type to c_expr.
379 * c-tree.h (c_finish_goto_ptr): Likewise.
380 Error out if the expression was not of a pointer type.
381
e4777439
GA
3822021-09-22 Jakub Jelinek <jakub@redhat.com>
383
384 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
385 modifiers.
386
cf74e7b5
GA
3872021-09-18 Jakub Jelinek <jakub@redhat.com>
388
389 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
390 and reproducible modifiers.
391 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
392
3932021-09-18 Jakub Jelinek <jakub@redhat.com>
394
395 * c-parser.c (c_parser_omp_clause_default): Handle private and
396 firstprivate arguments, adjust diagnostics on unknown argument.
397
0a4cb439
GA
3982021-09-17 Jakub Jelinek <jakub@redhat.com>
399
400 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
401 is true.
402
a26206ec
GA
4032021-09-10 Jakub Jelinek <jakub@redhat.com>
404
405 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
406 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
407 don't call build_conditional_expr, instead build a COND_EXPR directly.
408 (c_parser_binary_expression): Avoid calling parser_build_binary_op
409 if omp_atomic_lhs even in more cases for >, < or ==.
410 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
411 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
412 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
413 * c-typeck.c (build_binary_op): For flag_openmp only handle
414 MIN_EXPR/MAX_EXPR.
415
b2748138
GA
4162021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
417
418 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
419 directive.
420
e11c6046
GA
4212021-09-01 Iain Sandoe <iain@sandoe.co.uk>
422
423 * c-decl.c (enum deprecated_states): Add unavailable state.
424 (merge_decls): Copy unavailability.
425 (quals_from_declspecs): Handle unavailable case.
426 (start_decl): Amend the logic handling suppression of nested
427 deprecation states to include unavailability.
428 (smallest_type_quals_location): Amend comment.
429 (grokdeclarator): Handle the unavailable deprecation state.
430 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
431 * c-tree.h (struct c_declspecs): Add unavailable_p.
432 * c-typeck.c (build_component_ref): Handle unavailability.
433 (build_external_ref): Likewise.
434
4352021-09-01 Roger Sayle <roger@nextmovesoftware.com>
436 Joseph Myers <joseph@codesourcery.com>
437
438 PR c/79412
439 * c-decl.c (duplicate_decls): On significant mismatches, mark the
440 types of both (non-function) decls as error_mark_node, so that the
441 middle-end can see the code is malformed.
442 (free_attr_access_data): Don't process if the type has been set to
443 error_mark_node.
444
6d51ee43
GA
4452021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
446
447 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
448 and 'ancestor' in 'target device' clauses.
449
38b19c5b
GA
4502021-08-23 Jakub Jelinek <jakub@redhat.com>
451
452 * c-parser.c (c_parser_omp_clause_num_tasks,
453 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
454
5b2876f9
GA
4552021-08-22 Martin Uecker <muecker@gwdg.de>
456
457 PR c/98397
458 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
459 for pointers to arrays with qualifiers.
460 (build_conditional_expr): For C23 don't lose qualifiers for pointers
461 to arrays when the other pointer is a void pointer. Update warnings.
462 (convert_for_assignment): Update warnings for C2X when converting from
463 void* with qualifiers to a pointer to array with the same qualifiers.
464
7c9e1645
GA
4652021-08-20 Jakub Jelinek <jakub@redhat.com>
466
467 * c-parser.c (c_parser_omp_error): New function.
468 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
469
4702021-08-20 Jakub Jelinek <jakub@redhat.com>
471
472 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
473 comma at the end of list.
474 (c_parser_omp_requires): Likewise.
475
b57fba5e
GA
4762021-08-19 Jakub Jelinek <jakub@redhat.com>
477
478 * c-parser.c (c_parser_omp_requires): Don't call
479 c_parser_peek_2nd_token and optionally consume token if current
480 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
481
6e529985
GA
4822021-08-18 Jakub Jelinek <jakub@redhat.com>
483
484 * c-parser.c (c_parser_omp_nothing): New function.
485 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
486
4872021-08-18 Jakub Jelinek <jakub@redhat.com>
488
489 * c-parser.c (c_parser_statement_after_labels): Add restart label
490 near the start of the function. If c_parser_pragma returns false,
491 goto restart.
492 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
493 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
494 return what c_parser_omp_declare returned. Return true instead of
495 false after emitting errors that the directive is not allowed in
496 pragma_stmt context.
497 (c_parser_omp_ordered): Return true instead of
498 false after emitting errors that the directive is not allowed in
499 pragma_stmt context.
500 (c_parser_omp_target_update): Likewise.
501 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
502 Change return type from tree to bool, return false if the
503 directive should be ignored in pragma_stmt contexts.
504 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
505 return their result directly.
506 (c_parser_omp_cancellation_point): Change return type from void to
507 bool, return false if the directive should be ignored in pragma_stmt
508 contexts.
509 (c_parser_omp_declare): Likewise.
510
2d14d64b
GA
5112021-08-17 Jakub Jelinek <jakub@redhat.com>
512
513 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
514 (c_parser_omp_scope): New function.
515 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
516
72be20e2
GA
5172021-08-12 Jakub Jelinek <jakub@redhat.com>
518
519 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
520 (c_parser_omp_clause_filter): New function.
521 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
522 (OMP_MASKED_CLAUSE_MASK): Define.
523 (c_parser_omp_masked): New function.
524 (c_parser_omp_parallel): Handle parallel masked.
525 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
526 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
527
5282021-08-12 Martin Uecker <muecker@gwdg.de>
529
530 PR c/101838
531 PR c/29970
532 * c-typeck.c (c_expr_sizeof_type): Evaluate
533 size expressions for structs of variable size.
534
5352021-08-12 Tobias Burnus <tobias@codesourcery.com>
536
537 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
538 'primary' as alias for 'master'.
539
3ae564ea
GA
5402021-08-10 Martin Uecker <muecker@gwdg.de>
541
542 PR c/29970
543 * c-typeck.c (c_expr_sizeof_expr): Evaluate
544 size expressions for structs of variable size.
545
f92f4778
GA
5462021-08-06 Tamar Christina <tamar.christina@arm.com>
547
548 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
549 * c-tree.h (c_simulate_enum_decl): Likewise.
550
5512021-08-06 Martin Sebor <msebor@redhat.com>
552
553 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
554 vec arguments to by-reference.
555 (c_finish_omp_declare_simd): Same.
556 (c_parser_compound_statement_nostart): Same.
557 (c_parser_for_statement): Same.
558 (c_parser_objc_methodprotolist): Same.
559 (c_parser_oacc_routine): Same.
560 (c_parser_omp_for_loop): Same.
561 (c_parser_omp_declare_simd): Same.
562
419c6c68
GA
5632021-07-21 Thomas Schwinge <thomas@codesourcery.com>
564 Joseph Myers <joseph@codesourcery.com>
565 Cesar Philippidis <cesar@codesourcery.com>
566
567 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
568 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
569 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
570 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
571
92d45509
GA
5722021-07-20 Martin Sebor <msebor@redhat.com>
573
574 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
575 by-const-reference.
576 * c-typeck.c (c_build_function_call_vec): Same.
577
d97d71a1
GA
5782021-07-15 Martin Sebor <msebor@redhat.com>
579
580 PR c/101289
581 PR c/97548
582 * c-decl.c (get_parm_array_spec): Strip nops.
583
6fba0eea
GA
5842021-07-06 Martin Sebor <msebor@redhat.com>
585
586 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
587
7a60a6e8
GA
5882021-07-02 Jakub Jelinek <jakub@redhat.com>
589
590 PR c/101297
591 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
592 appears before a CPP_NAME.
593
90708f87
GA
5942021-06-25 Martin Sebor <msebor@redhat.com>
595
596 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
597 warning_suppressed_p, suppress_warning, and copy_no_warning.
598 (diagnose_mismatched_decls): Same.
599 (duplicate_decls): Same.
600 (grokdeclarator): Same.
601 (finish_function): Same.
602 (c_write_global_declarations_1): Same.
603 * c-fold.c (c_fully_fold_internal): Same.
604 * c-parser.c (c_parser_expr_no_commas): Same.
605 (c_parser_postfix_expression): Same.
606 * c-typeck.c (array_to_pointer_conversion): Same.
607 (function_to_pointer_conversion): Same.
608 (default_function_array_conversion): Same.
609 (convert_lvalue_to_rvalue): Same.
610 (default_conversion): Same.
611 (build_indirect_ref): Same.
612 (build_function_call_vec): Same.
613 (build_atomic_assign): Same.
614 (build_unary_op): Same.
615 (c_finish_return): Same.
616 (emit_side_effect_warnings): Same.
617 (c_finish_stmt_expr): Same.
618 (c_omp_clause_copy_ctor): Same.
619
9aa8327e
GA
6202021-06-24 Jakub Jelinek <jakub@redhat.com>
621
622 PR c/101176
623 * c-parser.c (c_parser_has_attribute_expression): Set source range for
624 the result.
625
6262021-06-24 Jakub Jelinek <jakub@redhat.com>
627
628 PR c/101171
629 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
630 error_mark_node.
631
6322021-06-24 Jakub Jelinek <jakub@redhat.com>
633
634 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
635 C_ORT_OMP for clauses on target construct.
636 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
637 (c_parser_omp_target): For non-combined target add
638 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
639 C_ORT_OMP_TARGET to c_finish_omp_clauses.
640 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
641 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
642 never present on C_ORT_*DECLARE_SIMD.
643 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
644 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
645 corresponding map clauses.
646
2f080224
GA
6472021-06-21 Jakub Jelinek <jakub@redhat.com>
648
649 PR inline-asm/100785
650 * c-typeck.c (c_mark_addressable): Diagnose trying to make
651 bit-fields addressable.
652
ede6c356
GA
6532021-06-15 Robin Dapp <rdapp@linux.ibm.com>
654
655 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
656 similar.
657
8dc48181
GA
6582021-06-14 Tobias Burnus <tobias@codesourcery.com>
659
660 PR c/100913
661 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
662 var in the error case.
663
438aac59
GA
6642021-06-07 Eric Botcazou <ebotcazou@adacore.com>
665
666 PR c/100920
667 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
668 spot built-in functions.
669
7d6987e9
GA
6702021-06-06 Jakub Jelinek <jakub@redhat.com>
671
672 PR c/100902
673 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
674 even when target is combined with other constructs.
675
6762021-06-06 Eric Botcazou <ebotcazou@adacore.com>
677
678 PR c/100920
679 * c-decl.c (finish_struct): Fix thinko in previous change.
680 * c-typeck.c (convert_for_assignment): Do not warn on pointer
681 assignment and initialization for storage order purposes if the
682 RHS is a call to a DECL_IS_MALLOC function.
683
600f90cb
GA
6842021-06-04 Martin Sebor <msebor@redhat.com>
685
686 PR c/100783
687 * c-objc-common.c (print_type): Handle erroneous types.
688
440c8a0a
GA
6892021-06-03 Jakub Jelinek <jakub@redhat.com>
690
691 PR c++/100859
692 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
693 after depend only cases.
694
ee682192
GA
6952021-05-31 Richard Biener <rguenther@suse.de>
696
697 PR c++/88601
698 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
699 * c-parser.c (c_parser_postfix_expression): Likewise.
700
48166757
GA
7012021-05-28 Richard Biener <rguenther@suse.de>
702
703 PR c/100803
704 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
705 invalid if conditions.
706
7072021-05-28 Jakub Jelinek <jakub@redhat.com>
708
709 PR middle-end/99928
710 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
711 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
712 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
713 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
714 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
715 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
716 if present in map_head, map_field_head or map_firstprivate_head
717 bitmaps.
718
7192021-05-28 Tobias Burnus <tobias@codesourcery.com>
720
721 * c-parser.c (c_parser_omp_clause_affinity): New.
722 (c_parser_omp_clause_name, c_parser_omp_variable_list,
723 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
724 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
725 c_finish_omp_clauses): Likewise.
726
01c59ef2
GA
7272021-05-26 Eric Botcazou <ebotcazou@adacore.com>
728
729 PR c/100653
730 * c-decl.c (finish_struct): Warn for a union containing an aggregate
731 field with a differing scalar storage order.
732
2832d51b
GA
7332021-05-21 Jakub Jelinek <jakub@redhat.com>
734
735 PR middle-end/99928
736 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
737 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
738 if a decl is mentioned both in map clause and in such firstprivate
739 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
740
65f32e5d
GA
7412021-05-19 Jakub Jelinek <jakub@redhat.com>
742
743 PR middle-end/99928
744 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
745 master when combined with taskloop.
746 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
747 parallel master when not combined with taskloop.
748
a8daf9a1
GA
7492021-05-18 Richard Biener <rguenther@suse.de>
750
751 PR c/100522
752 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
753 Diagnose calls to non-functions.
754 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
755
a7ffc1ef
GA
7562021-05-17 Richard Biener <rguenther@suse.de>
757
758 PR c/100625
759 * gimple-parser.c (c_parser_gimple_label): Avoid building
760 a GIMPLE label with NULL label decl.
761
f9af11c7
GA
7622021-05-13 Martin Sebor <msebor@redhat.com>
763
764 PR c/100550
765 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
766
0ff3a0f2
GA
7672021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
768
769 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
770 'close'.
771
aa891c56
GA
7722021-05-10 Martin Liska <mliska@suse.cz>
773
774 * c-aux-info.c (affix_data_type): Use startswith
775 function instead of strncmp.
776 * c-typeck.c (build_function_call_vec): Likewise.
777 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
778
62d87a32
GA
7792021-05-07 Eric Botcazou <ebotcazou@adacore.com>
780
781 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
782 on the address of a pointer field in a record with reverse SSO.
783
99e8df7a
GA
7842021-05-04 Tobias Burnus <tobias@codesourcery.com>
785
786 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
787 for || and && reductions.
788
3c8e539d
GA
7892021-04-29 Joseph Myers <joseph@codesourcery.com>
790
791 * c-typeck.c (function_types_compatible_p): For C2X, treat
792 unprototyped function as compatible with non-variadic prototyped
793 function even if some argument types are changed by the default
794 argument promotions.
795
ee351f7f
GA
7962021-04-15 Martin Sebor <msebor@redhat.com>
797
798 PR c/99420
799 PR c/99972
800 * c-decl.c (pushdecl): Always propagate type attribute.
801
8022021-04-15 Richard Sandiford <richard.sandiford@arm.com>
803
804 PR c/98852
805 * c-typeck.c (c_common_type): Do not drop attributes that
806 affect type identity.
807
1d54b138
GA
8082021-04-10 Jakub Jelinek <jakub@redhat.com>
809
810 PR c/99990
811 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
812 error_mark_node.
813
4493b1c1
GA
8142021-03-25 Jakub Jelinek <jakub@redhat.com>
815
816 PR c++/99565
817 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
818 to operand_equal_p.
819
5f256a70
GA
8202021-03-19 Jakub Jelinek <jakub@redhat.com>
821
822 PR c/99588
823 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
824 with modifycode NOP_EXPR produces and mark the _Atomic var as read
825 if found.
826 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
827 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
828 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
829
3c5b6d24
GA
8302021-03-15 Tobias Burnus <tobias@codesourcery.com>
831
832 PR c++/99509
833 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
834 ensure that the varpool node is marked as offloadable.
835
ceae9533
GA
8362021-03-05 Tobias Burnus <tobias@codesourcery.com>
837
838 PR c/99137
839 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
840
4028d01a
GA
8412021-02-24 Martin Sebor <msebor@redhat.com>
842
843 PR middle-end/97172
844 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
845
bf81237e
GA
8462021-02-18 Jakub Jelinek <jakub@redhat.com>
847
848 PR c/99136
849 * c-typeck.c (c_finish_return): Don't wrap retval into
850 EXCESS_PRECISION_EXPR in functions that return void.
851
0c5cdb31
GA
8522021-02-11 Marek Polacek <polacek@redhat.com>
853
854 * c-parser.c (c_parser_if_statement): Use vec_free.
855
a19dd5e6
GA
8562021-02-04 Martin Sebor <msebor@redhat.com>
857
858 PR c/97882
859 * c-decl.c (locate_old_decl): Add type to diagnostic output.
860 (diagnose_mismatched_decls): Same.
861 (start_function): Introduce temporaries for better readability.
862 * c-typeck.c (comptypes_internal): Only consider complete enum
863 types in comparisons with integers.
864
f7884fb1
GA
8652021-02-01 Martin Sebor <msebor@redhat.com>
866
867 PR middle-end/97172
868 * c-decl.c (free_attr_access_data): New function.
869 (c_parse_final_cleanups): Call free_attr_access_data.
870
59cf67d1
GA
8712021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
872
873 * c-parser.c (c_parser_omp_clause_detach): New.
874 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
875 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
876 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
877 clause. Prevent use of detach with mergeable and overriding the
878 data sharing mode of the event handle.
879
2f7f0d32
GA
8802021-01-15 Jakub Jelinek <jakub@redhat.com>
881
882 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
883 unqualified element type and then call c_build_qualified_type on the
884 ARRAY_TYPE.
885
7d187e4f
GA
8862021-01-07 Richard Biener <rguenther@suse.de>
887
888 * gimple-parser.c (c_parser_gimple_compound_statement): Only
889 reallocate loop array if it is too small.
890
eefe499f
GA
8912020-12-16 Martin Uecker <muecker@gwdg.de>
892
893 PR c/98047
894 * c-typeck.c (build_modify_expr): Drop qualifiers.
895
8962020-12-16 Martin Uecker <muecker@gwdg.de>
897
898 PR c/98260
899 * c-parser.c (c_parser_expression): Look into
900 nop expression when marking expressions as read.
901
d52945ce
GA
9022020-12-14 Martin Liska <mliska@suse.cz>
903
904 PR sanitizer/98204
905 * c-typeck.c (pointer_diff): Do not emit a top-level
906 sanitization.
907 (build_binary_op): Likewise.
908
ca2bd949
GA
9092020-12-09 Tobias Burnus <tobias@codesourcery.com>
910
911 * c-parser.c (c_parser_omp_allocate): New.
912 (c_parser_omp_construct): Call it.
913
9142020-12-09 Richard Biener <rguenther@suse.de>
915
916 PR c/98200
917 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
918 early on error.
919
bc8a7013
GA
9202020-12-07 Martin Uecker <muecker@gwdg.de>
921
922 PR c/97981
923 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
924 that drops qualifiers to the end of the function.
925
d48df6f2
GA
9262020-11-26 Martin Uecker <muecker@gwdg.de>
927
928 PR c/65455
929 PR c/92935
930 * c-parser.c (c_parser_declaration_or_fndef): Remove
931 redundant code to drop qualifiers of _Atomic types for __auto_type.
932 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
933 types for __typeof__.
934
1e2c9a27
GA
9352020-11-24 Jakub Jelinek <jakub@redhat.com>
936
937 PR c/97958
938 * c-parser.c (c_parser_binary_expression): For omp atomic binary
939 expressions, use make_node instead of build2 to avoid checking build2
940 performs.
941
8e6198d0
GA
9422020-11-23 Joseph Myers <joseph@codesourcery.com>
943
944 PR c/95630
945 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
946 for comparisons of complete and incomplete pointers.
947
7a97e2fc
GA
9482020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
949
950 * c-aux-info.c (gen_type): Support opaque types.
951
82e5048e
GA
9522020-11-20 Martin Sebor <msebor@redhat.com>
953
954 PR middle-end/97879
955 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
956
9572020-11-20 Jakub Jelinek <jakub@redhat.com>
958
959 PR other/97911
960 * Make-lang.in (c.serial): Change from goal to a variable.
961 (.PHONY): Drop c.serial.
962
9632020-11-20 Martin Uecker <muecker@gwdg.de>
964
965 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
966
d62586ee
GA
9672020-11-19 Jakub Jelinek <jakub@redhat.com>
968
969 PR c/97860
970 * c-decl.c (get_parm_array_spec): Bail out of nelts is
971 error_operand_p.
972
25bb75f8
GA
9732020-11-18 Jakub Jelinek <jakub@redhat.com>
974
975 * Make-lang.in (c.serial): New goal.
976 (.PHONY): Add c.serial c.prev.
977 (cc1$(exeext)): Call LINK_PROGRESS.
978
77f67db2
GA
9792020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
980
981 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
982 goto too.
983 * c-typeck.c (build_asm_expr): Remove an assert checking output
984 absence for asm goto.
985
9862020-11-13 Jakub Jelinek <jakub@redhat.com>
987
988 * c-typeck.c (c_finish_omp_clauses): Don't clear
989 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
990
9912020-11-13 Iain Sandoe <iain@sandoe.co.uk>
992
993 PR objc/77404
994 * c-parser.c (c_parser_objc_class_definition): Pass the
995 location of the class name to the interface declaration.
996
bb622641
GA
9972020-11-10 Strager Neds <strager.nds@gmail.com>
998
999 * c-decl.c (merge_decls): Use new overload of
1000 set_decl_section_name.
1001
10022020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1003
1004 * c-parser.c (c_parser_omp_target_data): Add use of
1005 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1006 handled map clause kind.
1007 (c_parser_omp_target_enter_data): Likewise.
1008 (c_parser_omp_target_exit_data): Likewise.
1009 (c_parser_omp_target): Likewise.
1010 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1011 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1012 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1013 same struct field access to co-exist on OpenMP construct.
1014
2da7ee05
GA
10152020-11-07 Martin Uecker <muecker@gwdg.de>
1016
1017 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1018 (c_parser_all_labels): Likewise.
1019
44cab2d8
GA
10202020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1021
1022 * c-parser.c (c_parser_objc_at_property_declaration):
1023 Improve parsing fidelity. Associate better location info
1024 with @property attributes. Clean up the interface to
1025 objc_add_property_declaration ().
1026
10272020-11-06 Nathan Sidwell <nathan@acm.org>
1028
1029 * c-decl.c (diagnose_mismatched_decls): Rename
1030 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1031 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1032 (collect_source_refs): Likewise.
1033 * c-typeck.c (inform_declaration, inform_for_arg)
1034 (convert_for_assignment): Likewise.
1035
10362020-11-06 Tobias Burnus <tobias@codesourcery.com>
1037
1038 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1039 OpenACC matching.
1040 (c_parser_omp_construct): Update call.
1041
35c125cb
GA
10422020-11-04 Jakub Jelinek <jakub@redhat.com>
1043
1044 PR c++/97670
1045 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1046 find underlying decl to clear in the aligned_head bitmap.
1047
10482020-11-04 Joseph Myers <joseph@codesourcery.com>
1049
1050 * c-decl.c (handle_nodiscard_attribute): New.
1051 (std_attribute_table): Add nodiscard.
1052 * c-parser.c (c_parser_std_attribute): Expect argument to
1053 nodiscard attribute to be a string. Do not special-case ignoring
1054 nodiscard.
1055 * c-typeck.c (maybe_warn_nodiscard): New.
1056 (build_compound_expr, emit_side_effect_warnings): Call
1057 maybe_warn_nodiscard.
1058 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1059 emit_side_effect_warnings if warn_unused_result.
1060
4f0606fe
GA
10612020-10-29 Asher Gordon <AsDaGo@posteo.net>
1062
1063 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1064 with XDELETE.
1065 (finish_init): Likewise.
1066 (pop_init_level): Likewise.
1067
e93aae4a
GA
10682020-10-28 Joseph Myers <joseph@codesourcery.com>
1069
1070 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1071 error_at for omitted parameter name.
1072
10732020-10-28 Jakub Jelinek <jakub@redhat.com>
1074
1075 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1076 (c_parser_omp_clause_allocate): New function.
1077 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1078 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1079 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1080 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1081 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1082 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1083 PRAGMA_OMP_CLAUSE_ALLOCATE.
1084 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1085
89bb01e7
GA
10862020-10-27 Joseph Myers <joseph@codesourcery.com>
1087
1088 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1089 standard attributes.
1090
efe71fcc
GA
10912020-10-23 Marek Polacek <polacek@redhat.com>
1092
1093 PR c++/91741
1094 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1095 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1096 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1097 * c-tree.h (char_type_p): Declare.
1098 * c-typeck.c (char_type_p): No longer static.
1099
11002020-10-23 Martin Sebor <msebor@redhat.com>
1101
1102 PR middle-end/97552
1103 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1104
2fe5b7d1
GA
11052020-09-19 Martin Sebor <msebor@redhat.com>
1106
1107 PR c/50584
1108 * c-decl.c (lookup_last_decl): Define new function.
1109 (c_decl_attributes): Call it.
1110 (start_decl): Add argument and use it.
1111 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1112 (get_parm_array_spec): Define new function.
1113 (push_parm_decl): Call get_parm_array_spec.
1114 (start_function): Call warn_parm_array_mismatch. Build attribute
1115 access and add it to current function.
1116 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1117 in forms of array parameters.
1118 * c-tree.h (start_decl): Add argument.
1119
11202020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1121
1122 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1123 with...
1124 (in_statement): New.
1125 (start_function): Adjust for above change.
1126 (c_push_function_context, c_pop_function_context): Likewise.
1127 * c-lang.h (struct language_function): Likewise.
1128 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1129 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1130 New.
1131 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1132 (c_parser_switch_statement): Adjust break/switch context handling
1133 and calls to renamed functions.
1134 (c_parser_while_statement): Adjust break/switch context handling and
1135 build a WHILE_STMT.
1136 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1137 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1138 (c_parser_omp_for_loop): Adjust break/switch context handling.
1139 * c-tree.h (c_break_label, c_cont_label): Delete.
1140 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1141 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1142 (in_statement, switch_statement_break_seen_p): Declare.
1143 (c_start_case, c_finish_case): Renamed to...
1144 (c_start_switch, c_finish_switch).
1145 (c_finish_bc_stmt): Adjust arguments.
1146 * c-typeck.c (build_function_call_vec): Don't try to print
1147 statements with %qE format.
1148 (struct c_switch): Rename switch_expr field to switch_stmt.
1149 Add break_stmt_seen_p field.
1150 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1151 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1152 (do_case): Update for changes to struct c_switch.
1153 (c_finish_case): Rename to c_finish_switch. Update for changes to
1154 struct c_switch and change of representation from SWITCH_EXPR to
1155 SWITCH_STMT.
1156 (c_finish_loop): Delete.
1157 (c_finish_bc_stmt): Update to reflect changes to break/continue
1158 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1159 of a GOTO_EXPR except for objc foreach loops.
1160
e1a4a8a0
GA
11612020-09-01 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR c++/96867
1164 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1165 only on PARM_DECLs.
1166
8f7ea26a
GA
11672020-08-28 Martin Sebor <msebor@redhat.com>
1168
1169 PR c/96596
1170 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1171 argument type.
1172
8b394f01
GA
11732020-08-27 Martin Liska <mliska@suse.cz>
1174
1175 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1176 growth function to true.
1177
db0f6efe
GA
11782020-08-25 Tobias Burnus <tobias@codesourcery.com>
1179
1180 PR c/96678
1181 * c-typeck.c (handle_omp_array_sections_1): Talk about
1182 array function parameter in the error message.
1183
5c265693
GA
11842020-08-18 Jakub Jelinek <jakub@redhat.com>
1185
1186 PR c/96571
1187 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1188 to int, holding index of the match. Call mark_exp_read on the selector
1189 expression and on expressions other than the selected one.
1190
4967ca2f
GA
11912020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1192
1193 PR c/96377
1194 * c-typeck.c (process_init_element): Split test for whether to
1195 recurse into a record, union or array into...
1196 (initialize_elementwise_p): ...this new function. Don't recurse
1197 into a vector type if the initialization value is also a vector.
1198
48cc2e46
GA
11992020-07-31 Richard Biener <rguenther@suse.de>
1200
1201 PR debug/96383
1202 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1203 Define to c_common_finalize_early_debug.
1204
3ea9abca
GA
12052020-07-22 Tobias Burnus <tobias@codesourcery.com>
1206
1207 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1208 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1209 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1210
30430061
GA
12112020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1212
1213 PR target/95237
1214 * c-decl.c (finish_decl): Call target hook
1215 lower_local_decl_alignment to lower local decl alignment.
1216
3f8ca9cb
GA
12172020-07-09 Julian Brown <julian@codesourcery.com>
1218 Thomas Schwinge <thomas@codesourcery.com>
1219
1220 PR middle-end/95270
1221 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1222 for standalone attach/detach clauses.
1223
a82c4c4c 12242020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1225
1226 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1227 set, warn for conversion between pointers that point to incompatible
1228 scalar storage orders.
1229
f60ee68d
GA
12302020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1231
1232 * c-parser.c (c_parser_statement_after_labels): Pass correct
1233 parameters to c_parser_do_statement.
1234
56638b9b
GA
12352020-06-16 Jakub Jelinek <jakub@redhat.com>
1236
1237 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1238 c_in_omp_for.
1239 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1240 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1241 c_finish_omp_for.
1242 * c-tree.h (c_in_omp_for): Declare.
1243 * c-typeck.c (c_in_omp_for): Define.
1244 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1245 (digest_init): Likewise.
1246 (build_binary_op): Likewise.
1247
12482020-06-16 Jakub Jelinek <jakub@redhat.com>
1249
1250 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1251 from kind by comma rather than colon.
1252
1a59f3db
GA
12532020-06-05 Mark Wielaard <mark@klomp.org>
1254
1255 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1256 an undeclared builtin, then add a fixit header hint, if found.
1257 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1258 warning_at about implicit builtin declaration type mismatch.
1259
9a5b7438
GA
12602020-06-03 Mark Wielaard <mark@klomp.org>
1261
1262 * c-parser.c (struct c_parser): Add seen_string_literal
1263 bitfield.
1264 (c_parser_consume_token): Reset seen_string_literal.
1265 (c_parser_error_richloc): Add name_hint if seen_string_literal
1266 and next token is a CPP_NAME and we have a missing header
1267 suggestion for the name.
1268 (c_parser_string_literal): Set seen_string_literal.
1269
12702020-06-03 Mark Wielaard <mark@klomp.org>
1271
1272 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1273 scope with matching_parens after CPP_OPEN_PAREN.
1274
12752020-06-03 Tobias Burnus <tobias@codesourcery.com>
1276
1277 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1278
53ffb43a
GA
12792020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1280
1281 * Make-lang.in: Remove extra slash.
1282
8f66f175
ML
12832020-05-19 Martin Liska <mliska@suse.cz>
1284
1285 * c-parser.c: Fix typo.
1286
49ddde69
JJ
12872020-05-14 Jakub Jelinek <jakub@redhat.com>
1288
1289 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1290
eb72dc66
RB
12912020-05-07 Richard Biener <rguenther@suse.de>
1292
1293 PR middle-end/94703
1294 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1295 DECL_GIMPLE_REG_P.
1296
bf915591
JJ
12972020-04-30 Jakub Jelinek <jakub@redhat.com>
1298
1299 PR c/94842
1300 * c-decl.c (set_labels_context_r): In addition to context-less
1301 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1302 parent function if any.
1303 (store_parm_decls): Adjust comment.
1304
e1113ffb
JJ
13052020-04-19 Jakub Jelinek <jakub@redhat.com>
1306
1307 PR objc/94637
1308 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1309 two CPP_COLON tokens.
1310
2e389749
JJ
13112020-04-17 Jakub Jelinek <jakub@redhat.com>
1312
1313 PR other/94629
1314 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1315 to data.clauses.
1316
2dc9294c
JJ
13172020-04-15 Jakub Jelinek <jakub@redhat.com>
1318
1319 PR c/94593
1320 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1321 requires directive when not at file scope.
1322
13e41d8b
TB
13232020-04-08 Tobias Burnus <tobias@codesourcery.com>
1324
1325 PR middle-end/94120
1326 * c-decl.c (c_check_in_current_scope): New function.
1327 * c-tree.h (c_check_in_current_scope): Declare it.
1328 * c-parser.c (c_parser_oacc_declare): Add check that variables
1329 are declared in the same scope as the directive. Fix handling
1330 of namespace vars.
1331
4df50a05
JJ
13322020-04-07 Jakub Jelinek <jakub@redhat.com>
1333
1334 PR c++/94512
1335 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1336 if c_parser_omp_master succeeded.
1337
5db9e893
JJ
13382020-03-23 Jakub Jelinek <jakub@redhat.com>
1339
1340 PR gcov-profile/94029
1341 PR c/94239
1342 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1343 the function_start_locus location. Don't do that afterwards for the
1344 __GIMPLE body parsing.
1345
9def91e9
JJ
13462020-03-19 Jakub Jelinek <jakub@redhat.com>
1347
1348 PR gcov-profile/94029
1349 * c-tree.h (finish_function): Add location_t argument defaulted to
1350 input_location.
1351 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1352 set it to the locus of closing } if non-NULL.
1353 (c_parser_compound_statement_nostart): Return locus of closing }.
1354 (c_parser_parse_rtl_body): Likewise.
1355 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1356 finish_function.
1357 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1358 input_location to set function_end_locus.
1359
046c5890
JJ
13602020-03-17 Jakub Jelinek <jakub@redhat.com>
1361
1362 PR c/94172
1363 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1364 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1365 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1366 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1367 ENUMERAL_TYPEs.
1368 (finish_incomplete_vars): New function, moved from finish_struct. Use
1369 relayout_decl instead of layout_decl.
1370 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1371 being TYPE_VFIELD. Use finish_incomplete_vars.
1372 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1373 finish_incomplete_vars.
1374 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1375 also on ENUMERAL_TYPEs.
1376
c015ff8c
JJ
13772020-03-16 Jakub Jelinek <jakub@redhat.com>
1378
1379 PR c/94179
1380 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1381
f2e9fe5f
MS
13822020-03-13 Martin Sebor <msebor@redhat.com>
1383
1384 PR c/94040
1385 * c-decl.c (builtin_structptr_type_count): New constant.
1386 (match_builtin_function_types): Reject decls that are incompatible
1387 in types pointed to by pointers.
1388 (diagnose_mismatched_decls): Adjust comments.
1389
c9d70946
JM
13902020-03-05 Joseph Myers <joseph@codesourcery.com>
1391
1392 PR c/93577
1393 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1394 empty when initialized type is error_mark_node.
1395 (set_designator, process_init_element): Ignore initializers for
1396 elements of a variable-size type or of error_mark_node.
1397
726e292d
MS
13982020-03-01 Martin Sebor <msebor@redhat.com>
1399
1400 PR middle-end/93926
1401 * c-decl.c (types_close_enough_to_match): New function.
1402 (match_builtin_function_types):
1403 (diagnose_mismatched_decls): Add missing inform call to a warning.
1404
a499c2f8
MS
14052020-03-01 Martin Sebor <msebor@redhat.com>
1406
1407 PR c/93812
1408 * c-typeck.c (build_functype_attribute_variant): New function.
1409 (composite_type): Call it.
1410
9c3da8cc
JJ
14112020-02-25 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR other/93912
1414 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1415 Rename last argument from probablity to probability.
1416
bacdd5e9
JJ
14172020-02-13 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR c/93576
1420 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1421 *expr if it has side effects.
1422
f9eb0973
JL
14232020-01-30 Jeff Law <law@redhat.com>
1424
1425 PR c/88660
1426 * c-parser.c (c_parser_switch_statement): Make sure to request
1427 marking the switch expr as used.
1428
ac68e287
JM
14292020-01-22 Joseph Myers <joseph@codesourcery.com>
1430
1431 PR c/93348
1432 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1433 argument with integer operands.
1434
852f0ae8
KK
14352020-01-16 Kerem Kat <keremkat@gmail.com>
1436
1437 PR c/92833
1438 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1439 to support 4 available tokens.
1440
e2346a33
JM
14412020-01-15 Joseph Myers <joseph@codesourcery.com>
1442
1443 PR c/93072
1444 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1445 determine whether to set DECL_CONTEXT.
1446
3d77686d
JM
14472020-01-13 Joseph Myers <joseph@codesourcery.com>
1448
1449 PR c/93241
1450 * c-typeck.c (build_c_cast): Check for expressions with integer
1451 operands that can occur in an unevaluated part of an integer
1452 constant expression and call note_integer_operands as needed.
1453
f74c4b2c
RB
14542019-01-08 Richard Biener <rguenther@suse.de>
1455
1456 PR middle-end/93199
1457 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1458 permanently.
1459
8d9254fc
JJ
14602020-01-01 Jakub Jelinek <jakub@redhat.com>
1461
1462 Update copyright years.
1463
39292e25
EB
14642019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1465
1466 * c-decl.c (collect_source_ref_cb): Delete.
1467 (for_each_global_decl): Rename into...
1468 (collect_source_refs): ...this. Call collect_source_ref directly.
1469 (c_parse_final_cleanups): Always call collect_source_ref on the main
1470 input filename.
1471
519d7496
JB
14722019-12-19 Julian Brown <julian@codesourcery.com>
1473 Cesar Philippidis <cesar@codesourcery.com>
1474
1475 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1476 detach clauses.
1477 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1478 Allow deref (->) in variable lists if true.
1479 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1480 Pass to c_parser_omp_variable_list.
1481 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1482 call to c_parser_omp_variable_list.
1483 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1484 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1485 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1486 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1487 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1488 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1489 and detach. Support deref.
1490 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1491 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1492 (c_oacc_check_attachments): New function.
1493 (c_finish_omp_clauses): Check attach/detach arguments for being
1494 pointers using above. Support deref.
1495
a6163563
JB
14962019-12-19 Julian Brown <julian@codesourcery.com>
1497 Maciej W. Rozycki <macro@codesourcery.com>
1498 Tobias Burnus <tobias@codesourcery.com>
1499 Thomas Schwinge <thomas@codesourcery.com>
1500
1501 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1502 (c_parser_oacc_data_clause): Likewise.
1503 (c_parser_oacc_all_clauses): Likewise.
1504 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1505 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1506 PRAGMA_OACC_CLAUSE_NO_CREATE.
1507 * c-typeck.c (handle_omp_array_sections): Support
1508 GOMP_MAP_NO_ALLOC.
1509
d68f5d45
DM
15102019-12-09 David Malcolm <dmalcolm@redhat.com>
1511
1512 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1513 Replace label_text ctor calls.
1514
4691bf46
JM
15152019-12-04 Joseph Myers <joseph@codesourcery.com>
1516
1517 PR c/36941
1518 PR c/88827
1519 * c-typeck.c (convert_lvalue_to_rvalue): Call
1520 require_complete_type for arguments not of void types.
1521 (build_indirect_ref): Do not diagnose dereferencing pointers to
1522 incomplete types.
1523 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1524
85d11957
JM
15252019-12-03 Joseph Myers <joseph@codesourcery.com>
1526
1527 PR c/88704
1528 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1529 old-style parameter definitions.
1530
4569f8b3
SL
15312019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1532
1533 PR target/92499
1534
1535 * c-decl.c (flexible_array_type_p): Move to common code.
1536
65ef05d0
RS
15372019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1538
1539 * c-decl.c (start_decl): Allow initialization of variables whose
1540 size is a POLY_INT_CST.
1541 (finish_decl): Use verify_type_context to check whether the target
1542 allows variables with a particular type to have static or thread-local
1543 storage duration. Don't raise a second error if such variables do
1544 not have a constant size.
1545 (grokdeclarator): Use verify_type_context to check whether the
1546 target allows fields or array elements to have a particular type.
1547 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1548 the target allows pointer difference for the types involved.
1549 (build_unary_op): Likewise for pointer increment and decrement.
1550
34b43828
JM
15512019-11-29 Joseph Myers <joseph@codesourcery.com>
1552
1553 * c-parser.c (struct c_parser): Add members raw_tokens and
1554 raw_tokens_used.
1555 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1556 using previously-lexed raw tokens.
1557 (c_parser_peek_nth_token_raw)
1558 (c_parser_check_balanced_raw_token_sequence): New functions.
1559 (c_parser_nth_token_starts_std_attributes): Use
1560 c_parser_check_balanced_raw_token_sequence for Objective-C.
1561
5b8d9367
JM
15622019-11-25 Joseph Myers <joseph@codesourcery.com>
1563
1564 PR c/91985
1565 * c-decl.c (finish_declspecs): Use int instead of decimal
1566 floating-point types if decimal floating-point not supported.
1567
1723e1be
JM
15682019-11-25 Joseph Myers <joseph@codesourcery.com>
1569
1570 * c-tree.h (struct c_declarator): Use a structure for id member.
1571 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1572 declarators at the start, not when handling individual declarators
1573 later. Use u.id.id instead of u.id.
1574 (grokfield): Use u.id.id instead of u.id.
1575 (build_id_declarator): Set u.id.id and u.id.attrs.
1576 (finish_declspecs): Handle postfix attributes in case of typedef
1577 name or typeof used.
1578 * c-parser.c (c_parser_direct_declarator)
1579 (c_parser_direct_declarator_inner): Place declarator for
1580 attributes inside that for function or array, not outside. Set
1581 u.id.attrs for identifiers.
1582 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1583 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1584 instead of u.id.
1585
bdaf8be1
JJ
15862019-11-22 Jakub Jelinek <jakub@redhat.com>
1587
1588 PR c/90677
1589 * c-decl.c (identifier_global_tag): Define.
1590
3e00ba47
RB
15912019-11-20 Richard Biener <rguenther@suse.de>
1592
1593 PR c/92088
1594 * c-decl.c (grokdeclarator): Prevent inlining of nested
1595 function with VLA arguments.
1596
8c5b727a
JM
15972019-11-20 Joseph Myers <joseph@codesourcery.com>
1598
1599 * c-decl.c (c_warn_type_attributes): New function.
1600 (groktypename, grokdeclarator, finish_declspecs): Call
1601 c_warn_type_attributes before applying attributes to types.
1602 * c-tree.h (c_warn_type_attributes): Declare.
1603
192961ff
JM
16042019-11-19 Joseph Myers <joseph@codesourcery.com>
1605
1606 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1607 standard attributes.
1608 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1609 pedwarn for unknown standard attributes and return error_mark_node
1610 for them.
1611
20a38017
MM
16122019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1613
1614 * c-parser.c (c_parser_parse_rtl_body): Always call
1615 run_rtl_passes, even if startwith pass is not provided.
1616
d5fbe5e0
JM
16172019-11-15 Joseph Myers <joseph@codesourcery.com>
1618
1619 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1620 duplicate standard attributes.
1621
97cc1187
JM
16222019-11-15 Joseph Myers <joseph@codesourcery.com>
1623
1624 * c-decl.c (std_attribute_table): Add maybe_unused.
1625
f8aea5e3
JM
16262019-11-15 Joseph Myers <joseph@codesourcery.com>
1627
1628 * c-decl.c (std_attribute_table): Add fallthrough.
1629 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1630 attribute at top level.
1631
2cc94aa8
JM
16322019-11-15 Joseph Myers <joseph@codesourcery.com>
1633
1634 * c-decl.c (std_attribute_table): New.
1635 (c_init_decl_processing): Register attributes from
1636 std_attribute_table.
1637 * c-parser.c (c_parser_attribute_arguments): Add arguments
1638 require_string and allow_empty_args. All callers changed.
1639 (c_parser_std_attribute): Set require_string argument for
1640 "deprecated" attribute.
1641
7c5890cc
JM
16422019-11-14 Joseph Myers <joseph@codesourcery.com>
1643
1644 * c-parser.c (c_parser_postfix_expression)
1645 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1646 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1647
e8738f4e
RS
16482019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1649
1650 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1651 of build_same_sized_truth_vector_type.
1652 (build_vec_cmp): Likewise.
1653
b2417b59
JJ
16542019-11-14 Jakub Jelinek <jakub@redhat.com>
1655
bedb7f04
JJ
1656 * c-parser.c (c_parser_omp_context_selector): Don't require score
1657 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1658 negative score.
1659
b2417b59
JJ
1660 * c-parser.c (c_parser_omp_context_selector): Rename
1661 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1662 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1663 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1664 and string literals.
1665
4e03c3a7
JM
16662019-11-14 Joseph Myers <joseph@codesourcery.com>
1667
1668 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1669 ctsk_tagfirstref_attrs.
1670 (struct c_declspecs): Update description of attrs. Add
1671 postfix_attrs and non_std_attrs_seen_p. Increase size of
1672 typespec_kind bit-field.
1673 (c_warn_unused_attributes): New declaration.
1674 (parser_xref_tag): Update prototype.
1675 * c-decl.c (c_warn_unused_attributes): New function.
1676 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1677 ctsk_tagref_attrs. Handle attribute declarations.
1678 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1679 (grokdeclarator): Handle standard attributes.
1680 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1681 attributes to incomplete type reference.
1682 (xref_tag): Update call to parser_xref_tag.
1683 (declspecs_add_addrspace, declspecs_add_type)
1684 (declspecs_add_scspec, declspecs_add_attrs): Set
1685 non_std_attrs_seen_p.
1686 (finish_declspecs): Apply postfix standard attributes to type.
1687 * c-parser.c (c_token_starts_declspecs)
1688 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1689 (c_parser_next_tokens_start_declaration): Update comments.
1690 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1691 parser->tokens[2] to parser->tokens[1].
1692 (c_parser_nth_token_starts_std_attributes)
1693 (c_parser_std_attribute_specifier_sequence): New functions.
1694 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1695 attrs. All callers changed. Handle standard attributes.
1696 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1697 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1698 All callers changed.
1699 (c_parser_declspecs): Add arguments start_std_attr_ok and
1700 end_std_attr_ok. All callers changed. Handle standard
1701 attributes.
1702 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1703 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1704 (c_parser_compound_statement_nostart, c_parser_all_labels)
1705 (c_parser_label, c_parser_statement, c_parser_for_statement):
1706 Handle standard attributes.
1707 * c-parser.h (c_parser_declspecs): Update prototype.
1708 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1709 c_parser_declspecs.
1710
0c29cac4
ML
17112019-11-12 Martin Liska <mliska@suse.cz>
1712
1713 * gimple-parser.c: Do not include params.h.
1714
028d4092
ML
17152019-11-12 Martin Liska <mliska@suse.cz>
1716
1717 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1718 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1719 macro.
1720
62aee289
MR
17212019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1722 Frederik Harwath <frederik@codesourcery.com>
1723
1724 gcc/c/
1725 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1726 (c_parser_oacc_kernels_parallel): Rename function to...
1727 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1728 (c_parser_omp_construct): Update accordingly.
1729
1730
7cec9588
JJ
17312019-11-11 Jakub Jelinek <jakub@redhat.com>
1732
1733 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1734 without corresponding end declare target.
1735
f486280c
RS
17362019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1737
1738 * c-convert.c (convert): Only handle vector conversions if one of
1739 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1740 allows it.
1741 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1742 vectors satisfy gnu_vector_type_p.
1743 (build_unary_op): Only allow unary operators to be applied to
1744 vectors if they satisfy gnu_vector_type_p.
1745 (digest_init): Only allow by-element initialization of vectors
1746 if they satisfy gnu_vector_type_p.
1747 (really_start_incremental_init): Likewise.
1748 (push_init_level): Likewise.
1749 (pop_init_level): Likewise.
1750 (process_init_element): Likewise.
1751 (build_binary_op): Only allow binary operators to be applied to
1752 vectors if they satisfy gnu_vector_type_p.
1753
017c6491
JM
17542019-11-08 Joseph Myers <joseph@codesourcery.com>
1755
1756 * c-decl.c (grokparms): Convert () in a function definition to
1757 (void) for C2x.
1758 (store_parm_decls_oldstyle): Pedwarn for C2x.
1759 (store_parm_decls): Update comment about () not generating a
1760 prototype.
1761
c01bd174
JM
17622019-11-07 Joseph Myers <joseph@codesourcery.com>
1763
1764 * c-parser.c (c_parser_attribute_arguments): New function.
1765 Factored out of c_parser_gnu_attribute.
1766 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1767 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1768 (c_parser_std_attribute_specifier): New functions.
1769 (c_parser_transaction_attributes): Use
1770 c_parser_std_attribute_specifier.
1771
471c5330
JM
17722019-11-07 Joseph Myers <joseph@codesourcery.com>
1773
1774 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1775 lex_joined_string and translate_strings_p.
1776 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1777 c_lex_with_flags.
1778 (c_parser_string_literal): New function.
1779 (c_parser_static_assert_declaration_no_semi): Use
1780 c_parser_string_literal. Do not set lex_untranslated_string.
1781 (c_parser_asm_string_literal): Use c_parser_string_literal.
1782 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1783 (c_parser_gnu_attributes): Set and restore translate_strings_p
1784 instead of lex_untranslated_string.
1785 (c_parser_asm_statement): Do not set lex_untranslated_string.
1786 (c_parser_asm_operands): Likewise.
1787 (c_parser_has_attribute_expression): Set and restore
1788 translate_strings_p instead of lex_untranslated_string.
1789 (c_parser_postfix_expression): Use c_parser_string_literal.
1790 (pragma_lex): Likewise.
1791 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1792 (c_parse_file): Set translate_strings_p.
1793 * gimple-parser.c (c_parser_gimple_postfix_expression)
1794 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1795 * c-parser.c (c_parser_string_literal): Declare function.
1796
d0c464d2
JJ
17972019-11-02 Jakub Jelinek <jakub@redhat.com>
1798
1799 * c-parser.c (c_finish_omp_declare_variant): Use
1800 omp_get_context_selector instead of c_omp_get_context_selector.
1801
ac2cfa6c
RS
18022019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1803
1804 * c-tree.h (c_simulate_enum_decl): Declare.
1805 * c-decl.c (c_simulate_enum_decl): New function.
1806 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1807
74078538
RS
18082019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1809
1810 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1811 * c-decl.c (c_simulate_builtin_function_decl): New function.
1812 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1813 to the above.
1814
ad1539d5
MS
18152019-10-28 Martin Sebor <msebor@redhat.com>
1816
1817 PR c/66970
1818 * c-decl.c (names_builtin_p): Define a new function.
1819
cb73e4e7
RB
18202019-10-28 Richard Biener <rguenther@suse.de>
1821
1822 PR c/92249
1823 * gimple-parser.c (c_parser_parse_gimple_body): Make
1824 current_bb the entry block initially to easier recover
1825 from errors.
1826 (c_parser_gimple_compound_statement): Adjust.
1827
135df52c
JJ
18282019-10-24 Jakub Jelinek <jakub@redhat.com>
1829
1830 * c-parser.c (c_finish_omp_declare_variant): Use
1831 omp_context_selector_matches instead of
1832 c_omp_context_selector_matches.
1833 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1834 attribute in between declare target and end declare target
1835 pragmas.
1836
783bfe5e
JM
18372019-10-15 Joseph Myers <joseph@codesourcery.com>
1838
1839 * c-parser.c (c_parser_attribute_any_word): Rename to
1840 c_parser_gnu_attribute_any_word. All callers changed.
1841 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1842 callers changed.
1843 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1844 callers changed.
1845 (c_parser_declaration_or_fndef, c_parser_declspecs)
1846 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1847 (c_parser_struct_declaration, c_parser_declarator)
1848 (c_parser_gnu_attribute, c_parser_compound_statement)
1849 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1850 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1851 attribute-related syntax productions.
1852
56898e43
RS
18532019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1854
1855 * c-objc-common.c (useful_aka_type_p): Replace with...
1856 (get_aka_type): ...this new function. Given the original type,
1857 decide which aka type to print (if any). Only look through typedefs
1858 if user_facing_original_type_p.
1859 (print_type): Update accordingly.
1860
b9424661
JJ
18612019-10-14 Jakub Jelinek <jakub@redhat.com>
1862
1863 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1864 into int NESTED, if it is 2, diagnose missing commas in between
1865 clauses.
1866 (c_parser_omp_context_selector): Pass 2 as last argument to
1867 c_parser_omp_all_clauses.
1868
20de9568
JJ
18692019-10-12 Jakub Jelinek <jakub@redhat.com>
1870
1871 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1872 For simd properties, put them directly into TREE_VALUE.
1873 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1874 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1875 add "omp declare variant base" attribute rather than
1876 "omp declare variant".
1877
fe2bc27c
JM
18782019-10-11 Joseph Myers <joseph@codesourcery.com>
1879
1880 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1881
94e7f906
JJ
18822019-10-10 Jakub Jelinek <jakub@redhat.com>
1883
1884 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1885 true, terminate processing on closing paren and don't skip to end of
1886 pragma line.
1887 (c_parser_omp_declare_simd): Handle also declare variant.
1888 (omp_construct_selectors, omp_device_selectors,
1889 omp_implementation_selectors, omp_user_selectors): New variables.
1890 (c_parser_omp_context_selector,
1891 c_parser_omp_context_selector_specification,
1892 c_finish_omp_declare_variant): New functions.
1893 (c_finish_omp_declare_simd): Handle both declare simd and
1894 declare variant.
1895 (c_parser_omp_declare): Handle declare variant.
1896
93313b94
JM
18972019-10-02 Joseph Myers <joseph@codesourcery.com>
1898
1899 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1900 CPP_COLON tokens.
1901
55879815
RS
19022019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1903
1904 * c-objc-common.c (useful_aka_type_p): New function.
1905 (print_type): Use it to decide whether an aka type is worth printing.
1906
59bc434a
JJ
19072019-09-27 Jakub Jelinek <jakub@redhat.com>
1908
1909 PR c++/88203
1910 * c-parser.c (c_parser_predefined_identifier): New function.
1911 (c_parser_postfix_expression): Use it.
1912 (c_parser_omp_variable_list): Parse predefined identifiers.
1913 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1914 in shared and firstprivate clauses, even when they are predetermined
1915 shared.
1916
c6447c20
RS
19172019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1918
1919 * c-typeck.c (build_function_call_vec): Take the original function
1920 decl as an optional final parameter. Pass all built-in calls to
1921 check_builtin_function_arguments.
1922
522da4c2
EB
19232019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1924
1925 PR c/91815
1926 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1927 of identifiers in the external scope only for variables and functions.
1928
68e2c199
PK
19292019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1930
1931 PR c/78736
1932 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1933
22f8849d
IS
19342019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1935
1936 PR pch/61250
1937 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1938 after determining that the first token is not
1939 PRAGMA_GCC_PCH_PREPROCESS.
1940
db376f45
EB
19412019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1942
1943 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1944 FUNCTION_DECL to the right value in the presence of nested declarators.
1945
4d732405
RS
19462019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1947
1948 PR middle-end/91421
1949 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1950
cb1180d5
RS
19512019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1952
1953 PR middle-end/91421
1954 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1955 of a built_in_function.
1956 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1957
77eb117f
JJ
19582019-08-10 Jakub Jelinek <jakub@redhat.com>
1959
1960 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1961 (c_parser_omp_clause_device_type): New function.
1962 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1963 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1964 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1965 diagnostics for declare target with clauses nested in clause-less
1966 declare target declaration-definition-seq.
1967 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1968
2c3b8bad
JJ
19692019-08-09 Jakub Jelinek <jakub@redhat.com>
1970
bb522e2e
JJ
1971 * c-parser.c (check_no_duplicate_clause): Simplify using
1972 omp_find_clause.
1973 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1974 directive name modifiers.
1975 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1976
2c3b8bad
JJ
1977 PR c/91401
1978 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1979 check_no_duplicate_clause call. Comment it out, instead emit a
1980 warning for duplicate dist_schedule clauses.
1981
99769e7f
RS
19822019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1983
1984 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1985
8860d270
JJ
19862019-08-08 Jakub Jelinek <jakub@redhat.com>
1987
1988 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1989 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1990 instead of generic_head to track duplicates.
1991
398e3feb
JJ
19922019-08-07 Jakub Jelinek <jakub@redhat.com>
1993
1994 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1995 (c_parser_omp_clause_use_device_addr): New function.
1996 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1997 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1998 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1999 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2000 map or use_device_* clauses.
2001 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2002 in OpenMP, require pointer type rather than pointer or array type.
2003 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2004
a28351e7
JJ
20052019-07-31 Jakub Jelinek <jakub@redhat.com>
2006
2007 PR c/91192
2008 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2009 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2010 case.
2011
6343b6bf
ML
20122019-07-25 Martin Liska <mliska@suse.cz>
2013 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2014
2015 PR c++/23383
2016 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2017
cb50701e
ML
20182019-07-25 Martin Liska <mliska@suse.cz>
2019
2020 * c-decl.c (merge_decls): Use new macros
2021 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2022
62e3e66f
RB
20232019-07-23 Richard Biener <rguenther@suse.de>
2024
2025 PR tree-optimization/83518
2026 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2027 a CFG also rebuild cgraph edges.
2028
554a530f
JJ
20292019-07-20 Jakub Jelinek <jakub@redhat.com>
2030
2031 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2032 (c_parser_omp_clause_bind): New function.
2033 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2034 (OMP_LOOP_CLAUSE_MASK): Define.
2035 (c_parser_omp_loop): New function.
2036 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2037 loop combined with parallel or teams.
2038 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2039 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2040
d119bf79
RS
20412019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2042
2043 PR c/53633
2044 * c-decl.c (finish_function): Check targetm.warn_func_return
2045 before issuing a -Wreturn-type warning.
2046
ab20d992 20472019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2048
2049 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2050 (c_parser_compound_statement): Call it.
2051
1fdd6f04
JJ
20522019-07-12 Jakub Jelinek <jakub@redhat.com>
2053
2054 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2055 (c_parser_omp_clause_order): New function.
2056 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2057 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2058 PRAGMA_OMP_CLAUSE_ORDER.
2059 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2060
8389386c
RB
20612019-07-10 Richard Biener <rguenther@suse.de>
2062
2063 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2064 _Literal (int *) &x for address literals.
2065
99b1c316
MS
20662019-07-09 Martin Sebor <msebor@redhat.com>
2067
2068 PR c++/61339
2069 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2070 to class.
2071 (field_decl_cmp): Same.
2072 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2073 * c-tree.h: Same.
2074 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2075
6c1dae73
MS
20762019-07-09 Martin Sebor <msebor@redhat.com>
2077
2078 PR c++/61339
2079 * c-decl.c: Change class-key from class to struct and vice versa
2080 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2081 * gimple-parser.c: Same.
2082
69b5279e
RB
20832019-07-01 Richard Biener <rguenther@suse.de>
2084
2085 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2086 _Literal (char *) &"foo" for address literals pointing to
2087 STRING_CSTs.
2088
ab20d992
JJ
20892019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2090
2091 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2092 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2093 C incompatibility if alternate "__intN__" form is used.
2094
1e3d475e
MS
20952019-06-24 Martin Sebor <msebor@redhat.com>
2096
2097 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2098
bf38f7e9
JJ
20992019-06-10 Jakub Jelinek <jakub@redhat.com>
2100
2101 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2102 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2103 (c_parser_omp_scan_loop_body): New function.
2104 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2105 inscan reduction clauses.
2106 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2107 non-inscan reductions on the same construct, or inscan reductions with
2108 ordered or schedule clauses, or inscan array reductions.
2109
65985d78
MS
21102019-06-05 Martin Sebor <msebor@redhat.com>
2111
2112 PR c/90737
2113 * c-typeck.c (c_finish_return): Only consider functions returning
2114 pointers as candidates for -Wreturn-local-addr.
2115
0ecf545c
MS
21162019-06-05 Martin Sebor <msebor@redhat.com>
2117
2118 * c-decl.c (start_decl): Adjust quoting and hyphenation
2119 in diagnostics.
2120 (finish_decl): Same.
2121 (finish_enum): Same.
2122 (start_function): Same.
2123 (declspecs_add_type): Same.
2124 * c-parser.c (warn_for_abs): Same.
2125 * c-typeck.c (build_binary_op): Same.
2126
e03436e7
TS
21272019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2128
b48f44bf
TS
2129 PR c/89433
2130 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2131 marked with an OpenACC 'routine' directive.
2132
5bf04509
TS
2133 PR c/89433
2134 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2135 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2136
e03436e7
TS
2137 PR c/89433
2138 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2139 clauses from "omp declare target" attribute.
2140
a9c697b8
MS
21412019-05-16 Martin Sebor <msebor@redhat.com>
2142
ab20d992
JJ
2143 * c-decl.c (start_decl): Quote keywords, operators, and
2144 types in diagnostics.
2145 (finish_decl): Same.
2146 * c-parser.c (c_parser_asm_statement): Same.
2147 (c_parser_conditional_expression): Same.
2148 (c_parser_transaction_cancel): Same.
2149 * c-typeck.c (c_common_type): Same.
2150 (build_conditional_expr): Same.
2151 (digest_init): Same.
2152 (process_init_element): Same.
2153 (build_binary_op): Same.
a9c697b8 2154
c4499192
RB
21552019-05-17 Richard Biener <rguenther@suse.de>
2156
2157 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2158 (c_parser_gimple_unary_expression): Likewise.
2159 (c_parser_gimple_parentized_ternary_expression): New function.
2160
adfe6e4b
RB
21612019-05-16 Richard Biener <rguenther@suse.de>
2162
2163 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2164 (c_parser_gimple_unary_expression): Likewise.
2165
186dabf2
RB
21662019-05-15 Richard Biener <rguenther@suse.de>
2167
2168 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2169 __BIT_FIELD_REF.
2170
1158c5b4
RB
21712019-05-14 Richard Biener <rguenther@suse.de>
2172
2173 * gimple-parser.c (c_parser_gimple_statement): Remove
2174 questionable auto-promotion to VIEW_CONVERT_EXPR.
2175 (c_parser_gimple_typespec): Split out from __MEM parsing.
2176 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2177 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2178 as __VIEW_CONVERT with -gimple.
2179
fd4485aa
ML
21802019-05-09 Martin Liska <mliska@suse.cz>
2181
2182 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2183 __MAX.
2184 (c_parser_gimple_unary_expression): Parse also binary expression
2185 __MIN and __MAX.
2186 (c_parser_gimple_parentized_binary_expression): New function.
2187
d276406a
ML
21882019-05-09 Martin Liska <mliska@suse.cz>
2189
2190 * gimple-parser.c (struct gimple_parser): Add probability.
2191 for gimple_parser_edge.
2192 (gimple_parser::push_edge): Add new argument probability.
2193 (c_parser_gimple_parse_bb_spec): Parse also probability
2194 if present.
2195 (c_parser_parse_gimple_body): Set edge probability.
2196 (c_parser_gimple_compound_statement): Consume token
2197 before calling c_parser_gimple_goto_stmt.
2198 Parse BB counts.
2199 (c_parser_gimple_statement): Pass new argument.
2200 (c_parser_gimple_goto_stmt): Likewise.
2201 (c_parser_gimple_if_stmt): Likewise.
2202 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2203 * c-parser.c (c_parser_declaration_or_fndef): Pass
2204 hot_bb_threshold argument.
2205 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2206 field.
2207 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2208
f179b64e
JJ
22092019-04-26 Jakub Jelinek <jakub@redhat.com>
2210
2211 PR debug/90197
2212 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2213 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2214 (c_parser_do_statement): Likewise.
2215 (c_parser_for_statement): Likewise. Formatting fixes.
2216 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2217 emit DEBUG_BEGIN_STMTs if needed.
2218
e7178413
JJ
22192019-04-19 Jakub Jelinek <jakub@redhat.com>
2220
c280b7ee
JJ
2221 PR c/89888
2222 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2223 (c_start_case): Don't clear it.
2224 (do_case): Adjust c_add_case_label caller.
2225 (c_finish_case): Adjust c_do_switch_warnings caller.
2226
e7178413
JJ
2227 PR c++/90108
2228 * c-decl.c (merge_decls): If remove is main variant and
2229 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2230 variant that has newdecl as TYPE_NAME if any.
2231
60a2c645
JJ
22322019-04-12 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR c/89933
2235 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2236 don't try to remove it from the variant list, but instead assert
2237 it has no variants.
2238
2a82beaa
RB
22392019-04-01 Richard Biener <rguenther@suse.de>
2240
2241 PR c/71598
2242 * c-tree.h (c_get_alias_set): Declare.
2243 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2244 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2245 as the underlying integer type.
2246
bec1da64
MS
22472019-03-19 Martin Sebor <msebor@redhat.com>
2248
2249 PR tree-optimization/89688
2250 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2251 kinds of initializers.
2252
855cd9b1
JJ
22532019-03-19 Jakub Jelinek <jakub@redhat.com>
2254
2255 PR c/89734
2256 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2257 return type even if quals_used is 0. Formatting fixes.
2258
baa09dc5
RB
22592019-03-14 Richard Biener <rguenther@suse.de>
2260
2261 * c-tree.h (enum c_declspec_il): New.
2262 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2263 enum bitfield.
2264 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2265 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2266 (c_parser_declspecs): Adjust.
2267 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2268 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2269 and bitmap.h.
2270 (struct gimple_parser): New.
2271 (gimple_parser::push_edge): New method.
2272 (c_parser_gimple_parse_bb_spec): New helper.
2273 (c_parser_parse_gimple_body): Get start pass and IL specification.
2274 Initialize SSA and CFG.
2275 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2276 Build a gimple_parser parsing state and pass it along.
2277 (c_parser_gimple_statement): Change intermittend __PHI internal
2278 function argument for the edge.
2279 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2280 (c_parser_gimple_goto_stmt): Record edges to build.
2281 (c_parser_gimple_if_stmt): Likewise.
2282 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2283 (c_parser_gimple_or_rtl_pass_list): Likewise.
2284
a3f9f006
ML
22852019-03-11 Martin Liska <mliska@suse.cz>
2286
2287 * c-decl.c (check_for_loop_decls): Wrap an option name
2288 in a string format message and fix GNU coding style.
2289 * c-parser.c (c_parser_declspecs): Likewise.
2290
1db01ff9
JJ
22912019-03-08 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR tree-optimization/89550
2294 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2295 returned true.
2296 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2297 or warning returned true.
2298
66dcb747
JJ
22992019-02-28 Jakub Jelinek <jakub@redhat.com>
2300
2301 PR c/89525
2302 * c-typeck.c (convert_arguments): Call inform_declaration only if
2303 the previous warning_at call returned true.
2304
2263c9f2
TS
23052019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2306
2307 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2308 parameter. Adjust all users.
2309 (c_parser_oacc_simple_clause): Replace parser with loc formal
2310 parameter. Adjust all users.
2311
ab20d992 23122019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2313
2314 PR c/87924
2315 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2316 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2317
5f88ba10
JJ
23182019-02-15 Jakub Jelinek <jakub@redhat.com>
2319
2320 PR c/89340
2321 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2322 before c_decl_attributes rather than after it.
2323
cfc30fd1
JJ
23242019-02-06 Jakub Jelinek <jakub@redhat.com>
2325
2326 PR c/89211
2327 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2328 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2329 instead of 3 nested ifs.
2330
fbe83e6b
JM
23312019-02-06 Joseph Myers <joseph@codesourcery.com>
2332
2333 PR c/88584
2334 * c-decl.c (finish_decl): Do not complete array types for arrays
2335 with external linkage not at file scope.
2336
f461f938
RB
23372019-02-05 Richard Biener <rguenther@suse.de>
2338
2339 PR c/88606
2340 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2341 all type variants when not supported.
2342
fe509359
JJ
23432019-01-30 Jakub Jelinek <jakub@redhat.com>
2344
2345 PR c/89061
2346 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2347 * c-decl.c (decl_jump_unsafe): Return false for
2348 C_DECL_COMPOUND_LITERAL_P decls.
2349 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2350
6a335b96
JJ
23512019-01-29 Jakub Jelinek <jakub@redhat.com>
2352
f4b7e754
JJ
2353 PR c/89045
2354 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2355 scope.
2356
6a335b96
JJ
2357 PR c/86125
2358 * c-decl.c (last_fileptr_type): Remove.
2359 (last_structptr_types): New variable.
2360 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2361 {old,new}rettype instead of the types themselves. Assert
2362 last_structptr_types array has the same number of elements
2363 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2364 argument oldtype and newtype. Instead of handling
2365 just fileptr_type_node specially, handle all builtin_structptr_types
2366 pointer nodes. Formatting fix.
2367
d8b5a1a0
MS
23682019-01-24 Martin Sebor <msebor@redhat.com>
2369
2370 PR c/86125
2371 PR c/88886
2372 PR middle-end/86308
2373 * c-decl.c (match_builtin_function_types): Add arguments.
2374 (diagnose_mismatched_decls): Diagnose mismatched declarations
2375 of built-ins more strictly.
2376
e21c4491
JJ
23772019-01-24 Jakub Jelinek <jakub@redhat.com>
2378
2379 PR c++/88976
2380 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2381 on #pragma omp cancel with different modifiers.
2382
420183d9
L
23832019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2384
2385 PR c/51628
2386 PR c/88664
2387 * c-typeck.c (convert_for_assignment): Upate the
2388 warn_for_address_or_pointer_of_packed_member call.
2389
17ad43dd
TH
23902019-01-16 Tom Honermann <tom@honermann.net>
2391 Jason Merrill <jason@redhat.com>
2392
2393 * c-typeck.c (digest_init): Revised the error message produced for
2394 ill-formed cases of array initialization with a string literal.
2395 (error_init): Make variadic.
2396
5f07d78a
JJ
23972019-01-12 Jakub Jelinek <jakub@redhat.com>
2398
2399 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2400
c4581bbf
JJ
24012019-01-07 Jakub Jelinek <jakub@redhat.com>
2402
2403 PR c/88701
2404 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2405 if current_function_decl is non-NULL.
2406
65c5b1eb
JM
24072019-01-07 Joseph Myers <joseph@codesourcery.com>
2408
2409 PR c/88720
2410 PR c/88726
2411 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2412 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2413 functions declared but never defined only for external scope, not
2414 for other scopes.
2415
d8fcab68
JJ
24162019-01-07 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c++/85052
2419 * c-parser.c (c_parser_postfix_expression): Parse
2420 __builtin_convertvector.
2421
a5544970
JJ
24222019-01-01 Jakub Jelinek <jakub@redhat.com>
2423
2424 Update copyright years.
2425
da77eace
L
24262018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2427
2428 PR c/51628
2429 * c-typeck.c (convert_for_assignment): Call
2430 warn_for_address_or_pointer_of_packed_member.
2431
1edf8866
SB
24322018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2433
2434 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2435 a more specific error message (instead of just falling through).
2436
db4fd626
SB
24372018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2438
2439 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2440 asm qualifier is first seen; use that to give nicer "duplicate asm
2441 qualifier" messages. Delete 'quals" variable, instead pass the
2442 "is_volatile_ flag to build_asm_stmt directly.
2443 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2444 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2445
9c9cfcbb
SB
24462018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2447
2448 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2449 "done" boolean variable.
2450
a14feb3c
DM
24512018-12-19 David Malcolm <dmalcolm@redhat.com>
2452
2453 PR c++/87504
2454 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2455 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2456 (build_binary_op): Use struct op_location_t and
2457 class binary_op_rich_location.
2458
6d939173
JJ
24592018-12-11 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR sanitizer/88426
2462 * c-convert.c (convert): Call c_fully_fold before calling
2463 ubsan_instrument_float_cast.
2464
b7055028
SB
24652018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2466
2467 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2468 setting "quals".
2469
5b76e75f
SB
24702018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2471
2472 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2473 after asm. Pass a flag for it to build_asm_expr.
2474 * c-tree.h (build_asm_expr): Update declaration.
2475 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2476 set ASM_INLINE_P.
2477
30bd42b9
SB
24782018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2479
2480 PR inline-asm/55681
2481 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2482 combination of volatile and goto, in any order, without repetitions.
2483
9df6c0e4
JB
24842018-12-04 James Norris <jnorris@codesourcery.com>
2485 Cesar Philippidis <cesar@codesourcery.com>
2486 Julian Brown <julian@codesourcery.com>
2487
2488 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2489 code.
2490
f44697b7
RB
24912018-11-30 Richard Biener <rguenther@suse.de>
2492
2493 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2494 _Literal (type) { ... } as empty aggregate or vector constructor.
2495
550dfbdc
MS
24962018-11-29 Martin Sebor <msebor@redhat.com>
2497
2498 PR c/88091
2499 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2500 (convert_arguments): Add comments. Pass additional argument to
2501 the function above.
2502
673670da
MS
25032018-11-29 Martin Sebor <msebor@redhat.com>
2504
2505 PR c/88172
2506 PR testsuite/88208
2507 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2508
db1d09b0
MS
25092018-11-23 Martin Sebor <msebor@redhat.com>
2510
2511 PR testsuite/88098
2512 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2513 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2514
98f08eb8
MS
25152018-11-20 Martin Sebor <msebor@redhat.com>
2516
2517 * c-parser.c (c_parser_has_attribute_expression): New function.
2518 (c_parser_attribute): New function.
2519 (c_parser_attributes): Move code into c_parser_attribute.
2520 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2521
cd5da983
MS
25222018-11-15 Martin Sebor <msebor@redhat.com>
2523
2524 PR c/83656
2525 * c-decl.c (header_for_builtin_fn): Declare.
2526 (diagnose_mismatched_decls): Diagnose declarations of built-in
2527 functions without a prototype.
2528 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2529 (convert_argument): Same.
2530 (convert_arguments): Factor code out into convert_argument.
2531 Detect mismatches between built-in formal arguments in calls
2532 to built-in without prototype.
2533 (build_conditional_expr): Same.
2534 (type_or_builtin_type): New function.
2535 (convert_for_assignment): Add argument. Conditionally issue
2536 warnings instead of errors for mismatches.
2537
620e594b
DM
25382018-11-13 David Malcolm <dmalcolm@redhat.com>
2539
2540 * c-decl.c: Replace "source_location" with "location_t".
2541 * c-tree.h: Likewise.
2542 * c-typeck.c: Likewise.
2543 * gimple-parser.c: Likewise.
2544
3179ebae
JJ
25452018-11-09 Jakub Jelinek <jakub@redhat.com>
2546
81a227c6
JJ
2547 * c-parser.c (c_parser_omp_clause_final): Use
2548 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2549 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2550 parsing instead of c_parser_paren_condition.
2551 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2552 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2553 c_fully_fold instead of c_parser_condition.
2554 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2555 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2556 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2557 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2558 c_parser_expr_no_commas instead of c_parser_expression.
2559
98c91c56
JJ
2560 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2561 reduction clause with inscan modifier.
2562
3179ebae
JJ
2563 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2564 clauses other than atomic_default_mem_order.
2565
28567c40
JJ
25662018-11-08 Jakub Jelinek <jakub@redhat.com>
2567
2568 * c-parser.c: Include memmode.h.
2569 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2570 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2571 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2572 task_reduction clauses.
2573 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2574 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2575 section, or lvalue assignment expression.
2576 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2577 (c_parser_omp_clause_lastprivate): Parse optional
2578 conditional: modifier.
2579 (c_parser_omp_clause_hint): Require constant integer expression rather
2580 than just integer expression.
2581 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2582 clause.
2583 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2584 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2585 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2586 functions.
2587 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2588 iterators. Parse mutexinoutset and depobj kinds.
2589 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2590 callers.
2591 (c_parser_omp_all_clauses): Likewise. Handle
2592 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2593 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2594 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2595 default memory order from requires directive if any. Adjust
2596 c_finish_omp_atomic caller.
2597 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2598 (c_parser_omp_flush): Parse flush with memory-order-clause.
2599 (c_parser_omp_for_loop): Allow NE_EXPR even in
2600 OpenMP loops, adjust c_finish_omp_for caller.
2601 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2602 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2603 Allow to be called while parsing combined parallel master.
2604 Parse combined master taskloop{, simd}.
2605 (c_parser_omp_parallel): Parse combined
2606 parallel master{, taskloop{, simd}} constructs.
2607 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2608 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2609 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2610 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2611 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2612 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2613 around teams body. Use SET_EXPR_LOCATION.
2614 (c_parser_omp_target_data): Allow target data
2615 with only use_device_ptr clauses.
2616 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2617 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2618 (c_parser_omp_requires): New function.
2619 (c_finish_taskloop_clauses): New function.
2620 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2621 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2622 declaration. Disallow in_reduction clause when combined with parallel
2623 master.
2624 (c_parser_omp_construct): Adjust c_parser_omp_master and
2625 c_parser_omp_taskgroup callers.
2626 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2627 other than cancel.
2628 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2629 like OMP_CLAUSE_REDUCTION.
2630 (handle_omp_array_sections): Likewise. Call save_expr on array
2631 reductions before calling build_index_type. Handle depend clauses
2632 with iterators.
2633 (struct c_find_omp_var_s): New type.
2634 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2635 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2636 with static, runtime or auto schedule kinds. Call save_expr for whole
2637 array reduction sizes. Diagnose reductions with zero sized elements
2638 or variable length structures. Diagnose nogroup clause used with
2639 reduction clause(s). Handle depend clause with
2640 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2641 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2642 some different type for other kinds. Use build_unary_op with
2643 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2644 Handle depend clauses with iterators. Remove no longer needed special
2645 case that predetermined const qualified vars may be specified in
2646 firstprivate clause. Complain if const qualified vars are mentioned
2647 in data-sharing clauses other than firstprivate or shared. Use
2648 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2649 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2650 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2651 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2652
7e2de6df
DM
26532018-10-29 David Malcolm <dmalcolm@redhat.com>
2654
2655 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2656 logic for change to name_hint::operator bool.
2657 (undeclared_variable): Likewise.
2658 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2659 (c_parser_parameter_declaration): Likewise.
2660
9f936c86
JM
26612018-10-17 Joseph Myers <joseph@codesourcery.com>
2662
2663 * c-errors.c (pedwarn_c11): New function.
2664 * c-parser.c (disable_extension_diagnostics): Save
2665 warn_c11_c2x_compat and set it to 0.
2666 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2667 (c_parser_static_assert_declaration_no_semi): Handle
2668 _Static_assert without string constant.
2669 * c-tree.h (pedwarn_c11): New prototype.
2670
033eb567
DM
26712018-10-17 David Malcolm <dmalcolm@redhat.com>
2672
2673 * Make-lang.in (selftest-c): New.
2674 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2675 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2676 from gcc/Makefile.in.
2677
0edf3afe
RB
26782018-10-02 Richard Biener <rguenther@suse.de>
2679
2680 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2681
8313a764
JM
26822018-09-26 Joseph Myers <joseph@codesourcery.com>
2683
2684 PR c/87390
2685 * c-typeck.c (build_binary_op): Use excess precision for
2686 comparisons of integers and floating-point for C11 and later.
2687
ce6f0888
MJ
26882018-09-26 Martin Jambor <mjambor@suse.cz>
2689
2690 PR c/87347
2691 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2692 comment.
ce6f0888 2693
9c4a4b3c
DM
26942018-09-17 David Malcolm <dmalcolm@redhat.com>
2695
2696 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2697 Update for new param.
2698 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2699 Likewise.
2700
80c6d1f4
MJ
27012018-09-17 Martin Jambor <mjambor@suse.cz>
2702
2703 PR c/63886
2704 * c-parser.c: (warn_for_abs): New function.
2705 (c_parser_postfix_expression_after_primary): Call it.
2706
4a426e36
BE
27072018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2708
2709 * c-typeck.c (digest_init): Shorten overlength strings.
2710
6d900107
BE
27112018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2712
2713 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2714
b5764229
BE
27152018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2716
2717 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2718 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2719
22eea6b2
AM
27202018-08-30 Alexander Monakov <amonakov@ispras.ru>
2721
2722 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2723 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2724
85204e23
DM
27252018-08-27 David Malcolm <dmalcolm@redhat.com>
2726
2727 PR 87091
2728 * c-decl.c (implicitly_declare): Update call to
2729 maybe_add_include_fixit to suggest overriding the location, as it
2730 is for a note.
2731 * c-objc-common.c (c_tree_printer): Update for conversion of
2732 show_caret_p to a tri-state.
2733
3d78e008
ML
27342018-08-27 Martin Liska <mliska@suse.cz>
2735
2736 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2737 fndecl_built_in_p and remove check for FUNCTION_DECL if
2738 possible.
3d78e008
ML
2739 (diagnose_mismatched_decls): Likewise.
2740 (merge_decls): Likewise.
2741 (warn_if_shadowing): Likewise.
2742 (pushdecl): Likewise.
2743 (implicitly_declare): Likewise.
2744 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2745 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2746 * c-typeck.c (build_function_call_vec): Likewise.
2747 (convert_arguments): Likewise.
2748
097f82ec
DM
27492018-08-20 David Malcolm <dmalcolm@redhat.com>
2750
2751 PR other/84889
2752 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2753 (diagnose_mismatched_decls): Likewise, in various places.
2754 (warn_if_shadowing): Likewise.
2755 (implicit_decl_warning): Likewise.
2756 (implicitly_declare): Likewise.
2757 (undeclared_variable): Likewise.
2758 (declare_label): Likewise.
2759 (grokdeclarator): Likewise.
2760 (start_function): Likewise.
2761 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2762 (c_parser_parameter_declaration): Likewise.
2763 (c_parser_binary_expression): Likewise.
2764 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2765 (parser_build_binary_op): Likewise.
2766 (build_unary_op): Likewise.
2767 (error_init): Likewise.
2768 (pedwarn_init): Likewise.
2769 (warning_init): Likewise.
2770 (convert_for_assignment): Likewise.
2771
96e6ae57
DM
27722018-08-15 David Malcolm <dmalcolm@redhat.com>
2773
2774 * c-objc-common.c: Include "gcc-rich-location.h".
2775 (c_tree_printer): Move implemenation of '%T' to...
2776 (print_type): ...this new function.
2777 (range_label_for_type_mismatch::get_text): New function.
2778 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2779 range for the various ic_argpass cases.
2780 (class maybe_range_label_for_tree_type_mismatch): New class.
2781 (build_binary_op): Use it when calling binary_op_error.
2782
0cd020ae 27832018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2784
0cd020ae
PK
2785 * c-decl.c (start_decl): Do not warn if variables is named as main
2786 and is a local variable.
2787
72733314
IS
27882018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2789
2790 PR c/19315
2791 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2792 objects of unknown size.
2793
23aa9f7c
MS
27942018-08-13 Martin Sebor <msebor@redhat.com>
2795
2796 PR tree-optimization/71625
2797 * c-parser.c (c_parser_declaration_or_fndef): Call
2798 braced_list_to_string.
2799
e5e7e50d
BH
28002018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2801
2802 PR c/86690
2803 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2804 errors.
2805
8a45b051
MS
28062018-08-01 Martin Sebor <msebor@redhat.com>
2807
2808 PR tree-optimization/86650
2809 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2810 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2811
5922dcb5
JJ
28122018-08-01 Jakub Jelinek <jakub@redhat.com>
2813
2814 PR c/85704
2815 * c-typeck.c (init_field_decl_cmp): New function.
2816 (output_pending_init_elements): Use it for field comparisons
2817 instead of pure bit_position comparisons.
2818
9b452033
JJ
28192018-07-12 Jakub Jelinek <jakub@redhat.com>
2820
2821 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2822 type here, instead add "omp declare target implicit" attribute.
2823 (finish_decl): Diagnose vars without mappable type here.
2824
ab20d992
JJ
28252018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2826 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2827 Cesar Philippidis <cesar@codesourcery.com>
2828
2829 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2830 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2831 to their non-present_or_* counterparts. Make 'self' an alias to
2832 PRAGMA_OACC_CLAUSE_HOST.
2833 (c_parser_oacc_data_clause): Update GOMP mappings for
2834 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2835 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2836 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2837 Remove support for present_or_* clauses.
2838 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2839 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2840 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2841 (OACC_DATA_CLAUSE_MASK): Likewise.
2842 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2843 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2844 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2845 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2846 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2847
e197e64e
KV
28482018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2849
2850 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2851 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2852 (c_parser_gimple_unary_expression): Likewise.
2853
487f2f61
JJ
28542018-06-15 Jakub Jelinek <jakub@redhat.com>
2855
2856 PR c/86093
2857 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2858 before doing POINTER_DIFF_EXPR.
2859
e4d44a37
MP
28602018-06-07 Marek Polacek <polacek@redhat.com>
2861
2862 PR c/85318
2863 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2864 for loop initial declarations.
2865
b67b9225
DP
28662018-05-30 David Pagan <dave.pagan@oracle.com>
2867
2868 PR c/55976
2869 * c-decl.c (grokdeclarator): Update check for return type warnings.
2870 (start_function): Likewise.
2871 (finish_function): Likewise.
2872 * c-typeck.c (c_finish_return): Update check for return type warnings.
2873 Pass OPT_Wreturn_type to pedwarn when appropriate.
2874
c566cc9f
RS
28752018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2876
2877 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2878 __FMA_EXPR handlng.
2879
e4f81565
RS
28802018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2881
2882 * gimple-parser.c: Include internal-fn.h.
2883 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2884 (c_parser_gimple_call_internal): New function.
2885 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2886 Fix typos in comment.
2887
79e7b1fe
JJ
28882018-05-10 Jakub Jelinek <jakub@redhat.com>
2889
2890 PR c++/85662
2891 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2892 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2893 fold_convert_loc.
2894 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2895 fold_offsetof_1, pass argtype as TYPE to it and drop the
2896 fold_convert_loc.
2897
f7584c81
DP
28982018-05-02 David Pagan <dave.pagan@oracle.com>
2899
2900 PR c/30552
2901 * c-decl.c (old_style_parameter_scope): New function.
2902 * c-parser.c (c_parser_postfix_expression): Check for statement
2903 expressions in old-style function parameter list declarations.
2904 * c-parser.h (old_style_parameter_scope): New extern declaration.
2905
b33a0cb3
JJ
29062018-04-25 Jakub Jelinek <jakub@redhat.com>
2907
2908 PR sanitizer/84307
2909 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2910 it is not TREE_STATIC.
2911 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2912 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2913 its COMPOUND_LITERAL_EXPR_DECL.
2914
c5c5822a
JM
29152018-03-21 Joseph Myers <joseph@codesourcery.com>
2916
2917 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2918 where all functions return the same _FloatN or _FloatNx type,
2919 treat integer types as _Float64 instead of double.
2920
aa1c9429
JJ
29212018-03-21 Jakub Jelinek <jakub@redhat.com>
2922
2923 PR c/84999
2924 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2925 building vector comparison, diagnose it and return error_mark_node.
2926
9bb45a95
JJ
29272018-03-15 Jakub Jelinek <jakub@redhat.com>
2928
2929 PR c/84853
2930 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2931 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2932 INTEGER_TYPE element type.
2933
ada6bad9
DP
29342018-03-13 David Pagan <dave.pagan@oracle.com>
2935
2936 PR c/46921
2937 * c-typeck.c (output_init_element): Ensure field initializer
2938 expression is always evaluated if there are side effects.
2939
849bbdb9
JJ
29402018-03-06 Jakub Jelinek <jakub@redhat.com>
2941
2942 PR c/84721
2943 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2944 !building_stmt_list_p ().
2945
d74641bd
RS
29462018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2947
2948 PR c/84305
2949 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2950 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2951 and include the BIND_EXPR in the list of things that need to be
2952 pre-evaluated.
2953
0444aa9c
NS
29542018-02-09 Nathan Sidwell <nathan@acm.org>
2955
2956 PR c/84293
2957 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2958 to strict_aliasing_warning.
2959
7c30b12a
PC
29602018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2961
2962 * c-typeck.c (really_start_incremental_init, push_init_level,
2963 set_nonincremental_init, output_init_element, process_init_element):
2964 Use DECL_UNNAMED_BIT_FIELD.
2965
2be4dfcb
MP
29662018-01-31 Marek Polacek <polacek@redhat.com>
2967
2968 PR c/81779
2969 * c-parser.c (c_parser_compound_statement_nostart): Call
2970 expansion_point_location_if_in_system_header.
2971
bb9869d5
DM
29722018-01-17 David Malcolm <dmalcolm@redhat.com>
2973
2974 PR c++/83814
2975 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2976 the C part.
2977
b4923738
JJ
29782018-01-13 Jakub Jelinek <jakub@redhat.com>
2979
2980 PR c/83801
2981 * c-tree.h (decl_constant_value_1): Add a bool argument.
2982 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2983 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2984 (decl_constant_value): Adjust caller.
2985 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2986 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2987 decl_constant_value returns initializer that has BLKmode or
2988 array type.
2989 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2990
928686b1
RS
29912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2992 Alan Hayward <alan.hayward@arm.com>
2993 David Sherwood <david.sherwood@arm.com>
2994
2995 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2996 TYPE_VECTOR_SUBPARTS.
2997
85ec4feb
JJ
29982018-01-03 Jakub Jelinek <jakub@redhat.com>
2999
3000 Update copyright years.
3001
913884f7
JJ
30022018-01-01 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR c/83595
3005 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3006 c_parser_conditional_expression, c_parser_cast_expression,
3007 c_parser_sizeof_expression, c_parser_alignof_expression,
3008 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3009 c_parser_transaction_expression): Use set_error () method instead
3010 of setting value member to error_mark_node.
3011
c6cfa2bf
MM
30122017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3013
3014 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3015 and _Float<N>X built-in functions.
3016
11d29d63
JJ
30172017-12-22 Jakub Jelinek <jakub@redhat.com>
3018
14ec014e
JJ
3019 PR debug/83550
3020 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3021 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3022 incomplete vars rather than after it.
3023
11d29d63
JJ
3024 PR debug/83547
3025 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3026 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3027 and consider empty ones if there are no other stmts. For
3028 -Wunused-value walk all statements before the one only followed by
3029 DEBUG_BEGIN_STMTs.
3030
170a8bd6 30312017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3032 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3033
3034 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3035 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3036 (c_parser_do_statement): Likewise.
3037 (c_parser_for_statement): Likewise.
3038 (c_parser_statement_after_labels): Adjust calls to above.
3039 (c_parse_pragma_ivdep): New static function.
3040 (c_parser_pragma_unroll): Likewise.
3041 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3042 <PRAGMA_UNROLL>: New case.
3043
01512446
JJ
30442017-12-19 Jakub Jelinek <jakub@redhat.com>
3045
3046 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3047 perform_integral_promotions, digest_init): Replace Yoda conditions
3048 with typical order conditions.
3049 * c-decl.c (check_bitfield_type_and_width): Likewise.
3050
c65e18d3
BE
30512017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3052
3053 * c-typeck.c (c_safe_arg_type_equiv_p,
3054 c_safe_function_type_cast_p): New function.
3055 (build_c_cast): Implement -Wcast-function-type.
3056
b7280579
RB
30572017-12-14 Richard Biener <rguenther@suse.de>
3058
3059 PR c/83415
3060 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3061 like REALPART_EXPR for the behavior of whether its operand
3062 is an lvalue.
3063
49e6a6c0
MP
30642017-12-12 Marek Polacek <polacek@redhat.com>
3065
3066 PR c/82679
3067 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3068
ab20d992 30692017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3070
3071 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3072 * c-parser.c (add_debug_begin_stmt): New.
3073 (c_parser_declaration_or_fndef): Call it.
3074 (c_parser_compound_statement_nostart): Likewise.
3075 (c_parser_statement_after_labels): Likewise.
3076 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3077
4b2b493f
JM
30782017-12-07 Joseph Myers <joseph@codesourcery.com>
3079
3080 * c-decl.c (build_compound_literal): Add parameter alignas_align
3081 and set alignment of decl if nonzero.
3082 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3083 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3084 qualifier.
3085 (c_parser_struct_declaration): Update syntax comment.
3086 (c_parser_type_name): Add alignas_ok argument and pass it to
3087 c_parser_declspecs.
3088 (c_parser_cast_expression): Pass true to c_parser_type_name and
3089 give error if a cast used an _Alignas specifier.
3090 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3091 give error if sizeof (type-name) used an _Alignas specifier.
3092 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3093 give error if _Alignof (type-name) used an _Alignas specifier.
3094 (c_parser_postfix_expression_after_paren_type): Check specified
3095 alignment for a compound literal and pass it to
3096 build_compound_literal.
3097 * c-parser.h (c_parser_type_name): Update prototype.
3098 * c-tree.h (build_compound_literal): Update prototype.
3099
5d9ae53d
MS
31002017-12-07 Martin Sebor <msebor@redhat.com>
3101
3102 PR c/81544
3103 * c-decl.c (c_decl_attributes): Look up existing declaration and
3104 pass it to decl_attributes.
3105
c79144f8
DM
31062017-12-06 David Malcolm <dmalcolm@redhat.com>
3107
3108 PR c/83236
3109 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3110 reserved for use by the implementation.
3111
613bc14f
DM
31122017-12-06 David Malcolm <dmalcolm@redhat.com>
3113
3114 * c-decl.c: Include "c-family/c-spellcheck.h".
3115
05abad4c
ML
31162017-12-05 Martin Liska <mliska@suse.cz>
3117 Jakub Jelinek <jakub@redhat.com>
3118
3119 * c-typeck.c (pointer_diff): Add new argument and instrument
3120 pointer subtraction.
3121 (build_binary_op): Similar for pointer comparison.
3122
cc6534d4
JJ
31232017-12-01 Jakub Jelinek <jakub@redhat.com>
3124
65791f42
JJ
3125 PR c/79153
3126 * c-parser.c: Include tree-iterator.h.
3127 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3128 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3129 on it.
3130
cc6534d4
JJ
3131 PR c/83222
3132 * c-tree.h (decl_constant_value_1): Declare.
3133 * c-typeck.c (decl_constant_value_1): New function.
3134 (decl_constant_value): Use it.
3135 * c-fold.c (c_fully_fold_internal): If in_init, use
3136 decl_constant_value_1 instead of decl_constant_value.
3137
5de73c05
JJ
31382017-11-30 Jakub Jelinek <jakub@redhat.com>
3139
3140 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3141
058f0b9e
JJ
31422017-11-28 Jakub Jelinek <jakub@redhat.com>
3143
3144 PR sanitizer/81275
3145 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3146 c_switch_covers_all_cases_p returns true.
3147
5e9d6aa4 31482017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3149 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3150
3151 * Make-lang.in (c/c-array-notation.o): Remove.
3152 * c-array-notation.c: Delete.
3153 * c-decl.c: Remove cilkplus condition.
3154 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3155 c_parser_cilk_verify_simd, c_parser_array_notation,
3156 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3157 c_parser_cilk_simd_fn_vector_attrs,
3158 c_finish_cilk_simd_fn_tokens): Delete.
3159 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3160 (c_parser_direct_declarator_inner): Ditto.
3161 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3162 (c_parser_attributes, c_parser_compound_statement,
3163 c_parser_statement_after_labels, c_parser_if_statement,
3164 c_parser_switch_statement, c_parser_while_statement,
3165 c_parser_do_statement, c_parser_for_statement,
3166 c_parser_unary_expression, c_parser_postfix_expression,
3167 c_parser_postfix_expression_after_primary,
3168 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3169 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3170 support.
3171 * c-typeck.c (build_array_ref, build_function_call_vec,
3172 convert_arguments,
3173 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3174 c_finish_loop, build_binary_op): Remove cilkplus support.
3175
9e851845
JJ
31762017-11-28 Jakub Jelinek <jakub@redhat.com>
3177
3178 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3179 of build3.
3180
ab20d992 31812017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3182
3183 * Make-lang.in (c.install-plugin): Install backend import library.
3184
41521dee
JJ
31852017-11-23 Jakub Jelinek <jakub@redhat.com>
3186
3187 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3188 pragma_stmt context.
3189
ac9effed
EB
31902017-11-23 Mike Stump <mikestump@comcast.net>
3191 Eric Botcazou <ebotcazou@adacore.com>
3192
3193 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3194 ANNOTATE_EXPR.
3195 (c_parser_do_statement): Likewise.
3196 (c_parser_for_statement): Likewise.
3197
ce95abc4
DM
31982017-11-22 David Malcolm <dmalcolm@redhat.com>
3199
3200 PR c++/62170
3201 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3202 bool to bool *. Within '%T' handling, if showing an "aka", use
3203 "quoted" param to add appropriate quoting.
3204
974aedcc
MP
32052017-11-22 Marek Polacek <polacek@redhat.com>
3206
3207 PR c++/60336
3208 PR middle-end/67239
3209 PR target/68355
3210 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3211
d4300cc6
DM
32122017-11-21 David Malcolm <dmalcolm@redhat.com>
3213
3214 PR c/83056
3215 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3216 earlier failed lookups.
3217
1af4ebf5
MG
32182017-11-21 Marc Glisse <marc.glisse@inria.fr>
3219
3220 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3221 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3222
26edace6
DM
32232017-11-20 David Malcolm <dmalcolm@redhat.com>
3224
3225 PR c/81404
3226 * c-decl.c: Include "c-family/known-headers.h".
3227 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3228 to known-headers.cc.
3229 (class suggest_missing_header): Move to known-header.h.
3230 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3231 than get_c_name_hint.
3232
b1212255
DM
32332017-11-20 David Malcolm <dmalcolm@redhat.com>
3234
3235 * c-decl.c (get_c_name_hint): New function.
3236 (class suggest_missing_header): New class.
3237 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3238 suggest missing headers to the user.
3239
6c7a259b
DM
32402017-11-20 David Malcolm <dmalcolm@redhat.com>
3241
3242 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3243 Include "c-family/name-hint.h"
3244 (implicit_decl_warning): Convert "hint" from
3245 const char * to name_hint. Pass location to
3246 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3247 warning was not printed.
3248 (undeclared_variable): Likewise for "guessed_id".
3249 (lookup_name_fuzzy): Convert return type from const char *
3250 to name_hint. Add location_t param.
3251 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3252 Include "c-family/name-hint.h"
3253 (c_parser_declaration_or_fndef): Convert "hint" from
3254 const char * to name_hint. Pass location to lookup_name_fuzzy.
3255 (c_parser_parameter_declaration): Likewise.
3256
f9c59f7e
JJ
32572017-11-19 Jakub Jelinek <jakub@redhat.com>
3258
3259 PR c/66618
3260 PR c/69960
3261 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3262 where needed.
3263 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3264 handle_omp_array_sections): Likewise.
3265 (digest_init): Don't call decl_constant_value_for_optimization.
3266 * c-tree.h (decl_constant_value_for_optimization): Removed.
3267 * c-fold.c (c_fold_array_ref): New function.
3268 (c_fully_fold_internal): Add LVAL argument, propagate it through
3269 recursive calls. For VAR_P call decl_constant_value and
3270 unshare if not LVAL and either optimizing or IN_INIT. Remove
3271 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3272 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3273 (c_fully_fold): Add LVAL argument, pass it through to
3274 c_fully_fold_internal.
3275 (decl_constant_value_for_optimization): Removed.
3276
3ca0dc60
JM
32772017-11-15 Joseph Myers <joseph@codesourcery.com>
3278
3279 PR c/81156
3280 * c-parser.c (check_tgmath_function): New function.
3281 (enum tgmath_parm_kind): New enum.
3282 (c_parser_postfix_expression): Handle __builtin_tgmath.
3283
64a5912c
DM
32842017-10-31 David Malcolm <dmalcolm@redhat.com>
3285
3286 * c-decl.c (implicit_decl_warning): Update for renaming of
3287 pedwarn_at_rich_loc and warning_at_rich_loc.
3288 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3289 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3290 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3291 (c_parser_struct_or_union_specifier): Likewise for renaming of
3292 pedwarn_at_rich_loc.
3293 (c_parser_parameter_declaration): Likewise for renaming of
3294 error_at_rich_loc.
3295 * c-typeck.c (build_component_ref): Likewise.
3296 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3297 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3298 (set_init_label): Likewise for renaming of error_at_rich_loc.
3299
c1136864
RB
33002017-10-30 Richard Biener <rguenther@suse.de>
3301
3302 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3303 stmts.
3304
ee5fd23a
MM
33052017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3306
3307 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3308 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3309
1a59ccf2
DM
33102017-10-25 David Malcolm <dmalcolm@redhat.com>
3311
3312 PR c/7356
3313 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3314 semicolons.
3315
bc1a75dd
JJ
33162017-10-25 Jakub Jelinek <jakub@redhat.com>
3317
3318 PR libstdc++/81706
3319 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3320 newdecl to corresponding __builtin_ if any.
3321
ff1ff960
PC
33222017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3323
3324 PR c++/82466
3325 * c-decl.c (diagnose_mismatched_decls): Use
3326 OPT_Wbuiltin_declaration_mismatch.
3327
62e1c678
DM
33282017-10-12 David Malcolm <dmalcolm@redhat.com>
3329
3330 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3331 use it to guard calls to maybe_suggest_missing_token_insertion.
3332 (c_parser_parms_list_declarator): Override default value of new
3333 "type_is_unique" param to c_parser_require.
3334 (c_parser_asm_statement): Likewise.
3335 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3336 defaulting to true.
3337
a92f6726
NS
33382017-10-11 Nathan Sidwell <nathan@acm.org>
3339
3340 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3341
8e6cdc90
RS
33422017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3343
3344 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3345 operating on trees as wide_ints.
3346 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3347 (c_tree_equal): Likewise.
3348
8139a48e
DM
33492017-10-04 David Malcolm <dmalcolm@redhat.com>
3350
3351 * c-decl.c (push_parm_decl): Store c_parm's location into the
3352 PARAM_DECL.
3353 (build_c_parm): Add "loc" param and store it within the c_parm.
3354 * c-parser.c (struct c_parser): Add "last_token_location" field.
3355 (c_parser_consume_token): Store location of the token into the
3356 new field.
3357 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3358 when handling a FUNCTION_DECL, if it doesn't already have them.
3359 (c_parser_parameter_declaration): Generate a location for the
3360 parameter, and pass it to the call to build_c_parm.
3361 * c-tree.h (struct c_parm): Add field "loc".
3362 (build_c_parm): Add location_t param.
3363 * c-typeck.c (get_fndecl_argument_location): New function.
3364 (inform_for_arg): New function.
3365 (convert_for_assignment): Use inform_for_arg when dealing with
3366 ic_argpass.
3367
2a389958
JJ
33682017-09-29 Jakub Jelinek <jakub@redhat.com>
3369
7d386d45
JJ
3370 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3371 width is non-NULL.
3372 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3373 don't SET_DECL_C_BIT_FIELD here.
3374
2a389958
JJ
3375 PR c/82340
3376 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3377 instead of trying to set just TREE_READONLY manually.
3378
ebc6a85e
TV
33792017-09-16 Tom de Vries <tom@codesourcery.com>
3380
3381 PR c/81875
3382 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3383 cond itself.
3384
bb75facd
JM
33852017-09-15 Joseph Myers <joseph@codesourcery.com>
3386
3387 PR c/82071
3388 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3389 for C11.
3390 (build_conditional_expr): For C11, generate result with excess
3391 precision when one argument is an integer and the other is of a
3392 type using excess precision.
3393
1d933576
BE
33942017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3395
3396 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3397
267bbb6f
MP
33982017-09-13 Marek Polacek <polacek@redhat.com>
3399
3400 PR c/82167
3401 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3402 than expr.original_type.
3403
6836632e
NS
34042017-09-12 Nathan Sidwell <nathan@acm.org>
3405
3406 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3407 resort_sorted_fields): Moved from c-family/c-common.c.
3408 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3409
e035be33
JM
34102017-09-01 Joseph Myers <joseph@codesourcery.com>
3411
3412 PR c/82071
3413 * c-typeck.c (build_atomic_assign): Handle argument with excess
3414 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3415 argument passed to build_binary_op and convert_for_assignment but
3416 not for call to c_fully_fold.
3417 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3418 Ensure build_binary_op is called with argument with original
3419 semantic type. Avoid calling c_fully_fold with an
3420 EXCESS_PRECISION_EXPR from build_binary_op.
3421
d2e05fcb
JJ
34222017-09-01 Jakub Jelinek <jakub@redhat.com>
3423
3424 PR c/81887
3425 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3426
b397965c
RS
34272017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3428 Alan Hayward <alan.hayward@arm.com>
3429 David Sherwood <david.sherwood@arm.com>
3430
3431 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3432 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3433 m1 and m2 to the signed equivalent of a fixed-point
3434 SCALAR_TYPE_MODE.
3435
14e18d71
DM
34362017-08-24 David Malcolm <dmalcolm@redhat.com>
3437
3438 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3439 than CAN_HAVE_LOCATION_P when determining whether to use the
3440 location_t value within "value".
3441
7f204c0f
DM
34422017-08-21 David Malcolm <dmalcolm@redhat.com>
3443
3444 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3445 rather than peeking the location of the first token.
3446 * c-tree.h (c_expr::get_location): New method.
3447
2f687306
DM
34482017-08-21 David Malcolm <dmalcolm@redhat.com>
3449
3450 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3451 to check_function_arguments.
3452
3e7b80d7
MP
34532017-08-18 Marek Polacek <polacek@redhat.com>
3454
3455 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3456 commentary.
3457
00aa1fa2
L
34582017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3459
3460 PR c/53037
3461 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3462 (check_bitfield_type_and_width): Don't allow bit-field with
3463 warn_if_not_aligned type.
3464
da67acb9
MS
34652017-08-14 Martin Sebor <msebor@redhat.com>
3466
3467 PR c/81117
3468 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3469
bb85aa74
MP
34702017-08-11 Marek Polacek <polacek@redhat.com>
3471
3472 PR c/81795
3473 * c-decl.c (pushtag): Only print inform if the warning was printed.
3474 (grokdeclarator): Likewise.
3475
32129a17
DM
34762017-08-10 David Malcolm <dmalcolm@redhat.com>
3477
3478 * c-parser.c (c_parser_error): Rename to...
3479 (c_parser_error_richloc): ...this, making static, and adding
3480 "richloc" parameter, passing it to the c_parse_error call,
3481 rather than calling c_parser_set_source_position_from_token.
3482 (c_parser_error): Reintroduce, reimplementing in terms of the
3483 above, converting return type from void to bool.
3484 (class token_pair): New class.
3485 (struct matching_paren_traits): New struct.
3486 (matching_parens): New typedef.
3487 (struct matching_brace_traits): New struct.
3488 (matching_braces): New typedef.
3489 (get_matching_symbol): New function.
3490 (c_parser_require): Add param MATCHING_LOCATION, using it to
3491 highlight matching "opening" tokens for missing "closing" tokens.
3492 (c_parser_skip_until_found): Likewise.
3493 (c_parser_static_assert_declaration_no_semi): Convert explicit
3494 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3495 class matching_parens, so that the pertinent open parenthesis is
3496 highlighted when there are problems locating the close
3497 parenthesis.
3498 (c_parser_struct_or_union_specifier): Likewise.
3499 (c_parser_typeof_specifier): Likewise.
3500 (c_parser_alignas_specifier): Likewise.
3501 (c_parser_simple_asm_expr): Likewise.
3502 (c_parser_braced_init): Likewise, for matching_braces.
3503 (c_parser_paren_condition): Likewise, for matching_parens.
3504 (c_parser_switch_statement): Likewise.
3505 (c_parser_for_statement): Likewise.
3506 (c_parser_asm_statement): Likewise.
3507 (c_parser_asm_operands): Likewise.
3508 (c_parser_cast_expression): Likewise.
3509 (c_parser_sizeof_expression): Likewise.
3510 (c_parser_alignof_expression): Likewise.
3511 (c_parser_generic_selection): Likewise.
3512 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3513 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3514 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3515 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3516 c_parser_skip_until_found call.
3517 (c_parser_objc_class_definition): Use class matching_parens as
3518 above.
3519 (c_parser_objc_method_decl): Likewise.
3520 (c_parser_objc_try_catch_finally_statement): Likewise.
3521 (c_parser_objc_synchronized_statement): Likewise.
3522 (c_parser_objc_at_property_declaration): Likewise.
3523 (c_parser_oacc_wait_list): Likewise.
3524 (c_parser_omp_var_list_parens): Likewise.
3525 (c_parser_omp_clause_collapse): Likewise.
3526 (c_parser_omp_clause_default): Likewise.
3527 (c_parser_omp_clause_if): Likewise.
3528 (c_parser_omp_clause_num_threads): Likewise.
3529 (c_parser_omp_clause_num_tasks): Likewise.
3530 (c_parser_omp_clause_grainsize): Likewise.
3531 (c_parser_omp_clause_priority): Likewise.
3532 (c_parser_omp_clause_hint): Likewise.
3533 (c_parser_omp_clause_defaultmap): Likewise.
3534 (c_parser_oacc_single_int_clause): Likewise.
3535 (c_parser_omp_clause_ordered): Likewise.
3536 (c_parser_omp_clause_reduction): Likewise.
3537 (c_parser_omp_clause_schedule): Likewise.
3538 (c_parser_omp_clause_num_teams): Likewise.
3539 (c_parser_omp_clause_thread_limit): Likewise.
3540 (c_parser_omp_clause_aligned): Likewise.
3541 (c_parser_omp_clause_linear): Likewise.
3542 (c_parser_omp_clause_safelen): Likewise.
3543 (c_parser_omp_clause_simdlen): Likewise.
3544 (c_parser_omp_clause_depend): Likewise.
3545 (c_parser_omp_clause_map): Likewise.
3546 (c_parser_omp_clause_device): Likewise.
3547 (c_parser_omp_clause_dist_schedule): Likewise.
3548 (c_parser_omp_clause_proc_bind): Likewise.
3549 (c_parser_omp_clause_uniform): Likewise.
3550 (c_parser_omp_for_loop): Likewise.
3551 (c_parser_cilk_clause_vectorlength): Likewise.
3552 (c_parser_cilk_clause_linear): Likewise.
3553 (c_parser_transaction_expression): Likewise.
3554 * c-parser.h (c_parser_require): Add param matching_location with
3555 default UNKNOWN_LOCATION.
3556 (c_parser_error): Convert return type from void to bool.
3557 (c_parser_skip_until_found): Add param matching_location with
3558 default UNKNOWN_LOCATION.
3559
30af3a2b
MP
35602017-08-09 Marek Polacek <polacek@redhat.com>
3561
3562 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3563 * c-tree.h (build_external_ref): Update declaration.
3564 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3565 (build_external_ref): Change the type of a parameter to bool.
3566 (parser_build_binary_op): Use true/false instead of 1/0.
3567 (pointer_diff): Likewise.
3568 (build_modify_expr): Likewise.
3569 (set_designator): Change the type of a parameter to bool.
3570 (set_init_index): Use true/false instead of 1/0.
3571 (set_init_label): Likewise.
3572 (output_init_element): Change the type of a parameter to bool.
3573 (output_pending_init_elements): Use true/false instead of 1/0.
3574 (process_init_element): Likewise.
3575 (build_binary_op): Change the type of a parameter to bool.
3576
296c53ac
MP
35772017-08-09 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/81233
3580 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3581 Call emit_diagnostic_valist instead of pedwarn.
3582 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3583 Print the relevant types in diagnostics.
3584
a32c8316
MP
35852017-08-09 Marek Polacek <polacek@redhat.com>
3586
3587 PR c/81417
3588 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3589 build_conditional_expr.
a32c8316
MP
3590 * c-parser.c (c_parser_conditional_expression): Create locations for
3591 EXP1 and EXP2 from their source ranges. Pass the locations down to
3592 build_conditional_expr.
3593 * c-tree.h (build_conditional_expr): Update declaration.
3594 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3595 For -Wsign-compare, also print the types.
3596
314e6352
ML
35972017-08-08 Martin Liska <mliska@suse.cz>
3598
3599 * c-convert.c: Include header files.
3600 * c-typeck.c: Likewise.
3601
577eec56
ML
36022017-08-07 Martin Liska <mliska@suse.cz>
3603
3604 * c-parser.c (c_parser_attributes): Canonicalize name of an
3605 attribute.
3606
f7b6353a
MP
36072017-08-02 Marek Polacek <polacek@redhat.com>
3608
3609 PR c/81289
3610 * c-parser.c (c_parser_unary_expression): Use set_error.
3611
8a6eab34
MP
3612 PR c/81448
3613 PR c/81306
3614 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3615 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3616
ab20d992 36172017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3618 Martin Liska <mliska@suse.cz>
3619
3620 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3621 statement.
7fef86d3 3622
f34ebeb2
ML
36232017-07-31 Martin Liska <mliska@suse.cz>
3624
3625 PR sanitize/81530
3626 * c-convert.c (convert): Guard condition with flag_sanitize_p
3627 also with current_function_decl non-null equality.
3628 * c-decl.c (grokdeclarator): Likewise.
3629 * c-typeck.c (build_binary_op): Likewise.
3630
8595f67b
MP
36312017-07-25 Marek Polacek <polacek@redhat.com>
3632
3633 * c-decl.c (grokfield): Remove local variable.
3634
d49718d6
MP
36352017-07-25 Marek Polacek <polacek@redhat.com>
3636
3637 PR c/81364
3638 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3639 macro expansion if the body is in { }.
3640 (c_parser_while_statement): Likewise.
3641 (c_parser_for_statement): Likewise.
3642
ff22eb12
NS
36432017-07-18 Nathan Sidwell <nathan@acm.org>
3644
3645 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3646
eea77d1f
DM
36472017-07-14 David Malcolm <dmalcolm@redhat.com>
3648
3649 * c-decl.c (implicitly_declare): When suggesting a missing
3650 #include, provide a fix-it hint.
3651
b6f43128
DM
36522017-07-06 David Malcolm <dmalcolm@redhat.com>
3653
3654 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3655 and call that instead.
3656 * c-tree.h (selftest::run_c_tests): New decl.
3657
3e2becc4
MP
36582017-06-26 Marek Polacek <polacek@redhat.com>
3659
3660 PR c/80116
3661 * c-parser.c (c_parser_if_body): Set the location of the
3662 body of the conditional after parsing all the labels. Call
3663 warn_for_multistatement_macros.
3664 (c_parser_else_body): Likewise.
3665 (c_parser_switch_statement): Likewise.
3666 (c_parser_while_statement): Likewise.
3667 (c_parser_for_statement): Likewise.
3668 (c_parser_statement): Add a default argument. Save the location
3669 after labels have been parsed.
3670 (c_parser_c99_block_statement): Likewise.
3671
343ae898
RB
36722017-06-19 Richard Biener <rguenther@suse.de>
3673
3674 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3675 negated _Literals to parse _Literal (int) -1.
3676
45b2222a
ML
36772017-06-13 Martin Liska <mliska@suse.cz>
3678
3679 PR sanitize/78204
3680 * c-convert.c (convert): Use sanitize_flags_p.
3681 * c-decl.c (grokdeclarator): Likewise.
3682 * c-typeck.c (convert_for_assignment): Likewise.
3683 (c_finish_return): Likewise.
3684 (build_binary_op): Likewise.
3685
8ab7005b
JJ
36862017-06-08 Jakub Jelinek <jakub@redhat.com>
3687
3688 PR c/81006
3689 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3690 to sizetype before size_binop.
3691
363dc72c
JJ
36922017-06-07 Jakub Jelinek <jakub@redhat.com>
3693
3694 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3695 of TDI_generic.
3696
dc949728
MP
36972017-06-06 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/79983
3700 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3701 ref.
3702 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3703
40ffd95f
BE
37042017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3705
3706 * c-parser.c (c_parser_binary_expression): Implement the
3707 -Wsizeof_pointer_div warning.
3708 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3709 from a parenthesized expression.
3710 (c_parser_expr_list): Use c_last_sizeof_loc.
3711 * c-tree.h (c_last_sizeof_loc): New external.
3712 * c-typeck.c (c_last_sizeof_loc): New variable.
3713 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3714
9fc5e7a4
MM
37152017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3716
3717 PR testsuite/80580
3718 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3719
f012c8ef
DM
37202017-05-30 David Malcolm <dmalcolm@redhat.com>
3721
3722 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3723 parameters.
3724
3cd211af
MS
37252017-05-24 Martin Sebor <msebor@redhat.com>
3726
3727 PR c/80731
3728 * c-fold.c (c_fully_fold_internal): Adjust.
3729 * c-typeck.c (parser_build_unary_op): Adjust.
3730
fd71a9a2
TS
37312017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3732
3733 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3734 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3735 "VECTOR_LENGTH".
3736
92fa0f9e
MP
37372017-05-23 Marek Polacek <polacek@redhat.com>
3738
3739 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3740 quotes.
3741
d11c168a
JJ
37422017-05-22 Jakub Jelinek <jakub@redhat.com>
3743
3744 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3745 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3746 it returned invariant. Call tree_invariant_p unconditionally
3747 afterwards to decide whether to return expr or op0.
3748
58aca9d9
NS
37492017-05-22 Nathan Sidwell <nathan@acm.org>
3750
3751 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3752
7fd549d2
TS
37532017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3754
3755 * c-parser.c (c_parser_omp_clause_default): Handle
3756 "OMP_CLAUSE_DEFAULT_PRESENT".
3757
6ecd2339
BE
37582017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3759
3760 * config-lang.in (gtfiles): Add c-family/c-format.c.
3761
8a57ecff
NS
37622017-05-18 Nathan Sidwell <nathan@acm.org>
3763
3764 * c-decl.c (pushdecl_top_level): Delete unused function.
3765
6574d78e
MP
37662017-05-18 Marek Polacek <polacek@redhat.com>
3767
3768 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3769 (check_earlier_gotos): Likewise.
3770 (define_label): Likewise.
3771 (pending_xref_error): Likewise.
3772 (smallest_type_quals_location): Likewise.
3773 (grokdeclarator): Likewise.
3774 (grokparms): Likewise.
3775 (identifier_global_value): Likewise.
3776 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3777 (find_init_member): Likewise.
3778
e3455240
MP
37792017-05-18 Marek Polacek <polacek@redhat.com>
3780
3781 * c-decl.c (start_decl): Use false/true instead of 0/1.
3782 (grokdeclarator): Likewise.
3783 (finish_struct): Likewise.
3784 (start_function): Change the return type to bool. Use false/true
3785 instead of 0/1.
3786 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3787 * c-tree.h (start_function): Update.
3788 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3789 (set_designator): Change the return type to bool. Use false/true
3790 instead of 0/1.
3791
3fa8871b
MP
37922017-05-17 Marek Polacek <polacek@redhat.com>
3793
3794 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3795 * c-typeck.c: Likewise.
3796
142473df
MP
37972017-05-17 Marek Polacek <polacek@redhat.com>
3798
3799 PR sanitizer/80659
3800 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3801 DECL_IGNORED_P even for non-static compound literals.
3802
1a817418
ML
38032017-05-17 Martin Liska <mliska@suse.cz>
3804
3805 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3806 use it instead of int type.
3807
b2fa0a8b
MP
38082017-05-17 Marek Polacek <polacek@redhat.com>
3809
3810 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3811 call c_fully_fold.
3812 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3813 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3814 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3815 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3816 save_expr.
3817 (c_parser_conditional_expression): Likewise.
3818 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3819 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3820 (process_init_element): Likewise.
3821 (build_binary_op): Likewise.
3822 (handle_omp_array_sections_1): Likewise.
3823
1e47f02b
TS
38242017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3825
3826 * c-parser.c (c_parser_omp_clause_num_gangs)
3827 (c_parser_omp_clause_num_workers)
3828 (c_parser_omp_clause_vector_length): Merge functions into...
3829 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3830 all users.
3831
c24e924f
NS
38322017-05-11 Nathan Sidwell <nathan@acm.org>
3833
3834 * gimple-parser.c: Don't #include tree-dump.h.
3835
c587104e
MM
38362017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3837
3838 PR testsuite/80580
3839 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3840
67ac9a9d
MM
38412017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3842
3843 PR testsuite/80580
3844 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3845 incorrect __MEM syntax.
3846
ac4eb40f
MM
38472017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3848
3849 PR testsuite/80580
3850 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3851 type of unary '*'.
3852
641da50a
NS
38532017-05-09 Nathan Sidwell <nathan@acm.org>
3854
3855 * c-tree.h (pushdecl): Declare.
3856
56d35585
DM
38572017-05-05 David Malcolm <dmalcolm@redhat.com>
3858
3859 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3860 with diagnostic_report_diagnostic.
3861 * c-errors.c (pedwarn_c99): Likewise.
3862 (pedwarn_c90): Likewise.
3863
815d9cc6
XR
38642017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3865
92a285c1 3866 PR c++/80038
815d9cc6
XR
3867 * c-gimplify.c (c_gimplify_expr): Remove calls to
3868 cilk_gimplifY_call_params_in_spawned_fn.
3869
1c4ea66f
DM
38702017-04-25 David Malcolm <dmalcolm@redhat.com>
3871
3872 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3873 hint for removing extra semicolon.
3874
666f7903
JJ
38752017-04-21 Jakub Jelinek <jakub@redhat.com>
3876
3877 PR c/80468
3878 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3879 enabled, set specs->type to integer_type_node.
3880
5764ee3c
JW
38812017-04-03 Jonathan Wakely <jwakely@redhat.com>
3882
3883 * c-array-notation.c: Fix typo in comment.
3884
10fa8dfb
MP
38852017-03-29 Marek Polacek <polacek@redhat.com>
3886
3887 PR c/79730
3888 * c-decl.c (finish_decl): Check VAR_P.
3889
a9e4a1a5
JJ
38902017-03-27 Jakub Jelinek <jakub@redhat.com>
3891
3892 PR middle-end/80162
3893 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3894 * c-typeck.c (c_mark_addressable): Likewise. Look through
3895 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3896 to ARRAY_TYPE.
3897 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3898
ee3ff394
MP
38992017-03-23 Marek Polacek <polacek@redhat.com>
3900
3901 * c-tree.h: Remove a C_RID_YYCODE reference.
3902
4d1b8e70
JJ
39032017-03-21 Jakub Jelinek <jakub@redhat.com>
3904
3905 PR c/80097
3906 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3907 optional COMPOUND_EXPR with ubsan instrumentation.
3908
31dc71a8
MP
39092017-03-17 Marek Polacek <polacek@redhat.com>
3910
3911 * c-parser.c: Add C11 references.
3912
d579c385
MP
39132017-03-15 Marek Polacek <polacek@redhat.com>
3914
3915 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3916
85059a38
MP
39172017-03-11 Marek Polacek <polacek@redhat.com>
3918
3919 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3920
2f6f187a
DM
39212017-03-10 David Malcolm <dmalcolm@redhat.com>
3922
3923 PR translation/79848
3924 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3925 "%qs".
3926 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3927
36618428
MP
39282017-03-09 Marek Polacek <polacek@redhat.com>
3929
3930 PR sanitizer/79757
3931 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3932 parameter declarations with initializers.
3933
01e5af5a
JJ
39342017-03-09 Jakub Jelinek <jakub@redhat.com>
3935
3936 PR c/79969
3937 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3938 TYPE_STUB_DECL.
3939
a71dbc63
JJ
39402017-03-07 Jakub Jelinek <jakub@redhat.com>
3941
3942 PR c/79834
3943 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3944 for "may only be used in compound statements" diagnostics, change it
3945 such that the same translatable string is used for all pragmas. For
3946 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3947 diagnostics.
3948 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3949 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3950 "may only be used in compound statements" diagnostics, such that the
3951 same translatable string is used for all pragmas.
3952
1ff4bae6
MP
39532017-03-04 Marek Polacek <polacek@redhat.com>
3954
3955 PR c/79847
3956 * c-decl.c (implicit_decl_warning): Add missing space.
3957
7f5a7d78
MP
39582017-03-03 Marek Polacek <polacek@redhat.com>
3959
3960 PR c/79758
3961 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3962 current_function_prototype_arg_types is error_mark_node. Fix
3963 formatting. Use TREE_VALUE instead of TREE_TYPE.
3964
883c8f06
JJ
39652017-03-03 Jakub Jelinek <jakub@redhat.com>
3966
79c9b7a8
JJ
3967 PR c/79837
3968 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3969 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3970 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3971 diagnostics.
3972
883c8f06
JJ
3973 PR c/79836
3974 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3975 instead of %<_Generic>.
3976 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3977 (c_parser_omp_target_exit_data): Use %<release%> instead of
3978 %<release>.
3979
324ff1a0
JJ
39802017-02-28 Jakub Jelinek <jakub@redhat.com>
3981
3982 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3983 instead of just cond ? "..." : "...".
3984 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3985 for "enter"/"exit" keyword.
3986 (c_finish_oacc_routine): Don't use %s to supply portions of the
3987 message.
3988
4227c9ad
JJ
39892017-02-24 Jakub Jelinek <jakub@redhat.com>
3990
3991 PR c++/79588
3992 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3993 handle -Wrestrict here.
3994 * c-typeck.c (build_function_call_vec): Adjust
3995 check_function_arguments caller.
3996
5d972e66
RB
39972017-02-23 Richard Biener <rguenther@suse.de>
3998
3999 PR c/79684
4000 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4001 to initialize c_exprs to return.
4002 (c_parser_gimple_binary_expression): Likewise.
4003 (c_parser_gimple_unary_expression): Likewise.
4004 (c_parser_gimple_postfix_expression): Likewise.
4005
61ac5ebe
MP
40062017-02-22 Marek Polacek <polacek@redhat.com>
4007
4008 PR c/79662
4009 * c-typeck.c (convert_arguments): Handle error_mark_node.
4010
41d1b0b1
PK
40112017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4012
4013 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4014 value of c_parser_parse_ssa_name against error_mark_node and emit
4015 error if ssa name is anonymous and written as default definition.
4016
eab1f169
PK
40172017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4018
4019 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4020 FMA_EXPR.
4021
bcac0b4d
JJ
40222017-02-16 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR c++/79512
4025 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4026 ignore #pragma omp target even when not followed by identifier.
4027
1be33173
PK
40282017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4029
4030 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4031 (c_parser_gimple_unary_expression): Likewise.
4032
aa326bfb
JJ
40332017-02-13 Jakub Jelinek <jakub@redhat.com>
4034
4035 * c-parser.c (c_parser_oacc_declare): Add missing space in
4036 diagnostics.
4037
8a398bc5
PK
40382017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4039
4040 PR c/79478
4041 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4042 set_c_expr_source_range when parsing ssa-name.
4043
3dcde5ef 40442017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4045 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4046
4047 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4048 building IL when arguments are error_mark_node.
4049 (c_parser_gimple_unary_expression): Likewise.
4050 (c_parser_gimple_if_stmt): Likewise.
4051 (c_parser_gimple_switch_stmt): Likewise.
4052 (c_parser_gimple_return_stmt): Likewise.
4053 (c_parser_parse_ssa_name): When name lookup fails do not build
4054 an SSA name. Use undeclared rather than not declared in error
4055 reporting.
4056
192b048b
MP
40572017-02-09 Marek Polacek <polacek@redhat.com>
4058
4059 PR c/79428
4060 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4061 instead of c_parser_skip_until_found.
4062
56f71478
JJ
40632017-02-09 Jakub Jelinek <jakub@redhat.com>
4064
4065 PR c/79431
4066 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4067 symtab_node::get on automatic variables.
4068
02889d23
CLT
40692016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4070 Chung-Lin Tang <cltang@codesourcery.com>
4071
4072 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4073 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4074 semantic checking.
4075 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4076
7af4b20d
RB
40772017-02-07 Richard Biener <rguenther@suse.de>
4078
4079 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4080 (c_parser_gimple_postfix_expression_after_primary):
4081 Do not use c_build_function_call_vec to avoid folding and promotion.
4082 Simplify.
4083
e5e391d6
MO
40842017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4085
4086 PR lto/79061
4087 * c-decl.c (pop_scope): Pass main_input_filename to
4088 build_translation_unit_decl.
4089
c2e84327
DM
40902017-01-24 David Malcolm <dmalcolm@redhat.com>
4091
4092 * c-parser.c: Include "read-rtl-function.h" and
4093 "run-rtl-passes.h".
4094 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4095 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4096 production. Update for renaming of field "gimple_pass" to
4097 "gimple_or_rtl_pass". If __RTL was seen, call
4098 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4099 to an auto_timevar, to cope with early exit.
4100 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4101 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4102 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4103 Handle RID_RTL.
4104 (c_parser_parse_rtl_body): New function.
4105 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4106 (struct c_declspecs): Rename field "gimple_pass" to
4107 "gimple_or_rtl_pass". Add field "rtl_p".
4108 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4109 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4110 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4111 (c_parser_gimple_or_rtl_pass_list): ...this.
4112
2ebd93e1
MP
41132017-01-20 Marek Polacek <polacek@redhat.com>
4114
4115 PR c/64279
4116 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4117
b1c95bb5
RB
41182017-01-13 Richard Biener <rguenther@suse.de>
4119
4120 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4121 nops.
4122
25329913
RB
41232017-01-13 Richard Biener <rguenther@suse.de>
4124
4125 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4126 _Literal ( type-name ) number.
4127
6bb4ea5c
RB
41282017-01-12 Richard Biener <rguenther@suse.de>
4129
4130 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4131 __MEM.
4132
6b5b4e9c
JJ
41332017-01-11 Jakub Jelinek <jakub@redhat.com>
4134
4135 PR c++/72813
4136 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4137 PCH file.
4138
e3252775
RB
41392017-01-11 Richard Biener <rguenther@suse.de>
4140
4141 PR bootstrap/79052
4142 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4143 returns on parse errors.
4144
a9342885
MP
41452017-01-04 Marek Polacek <polacek@redhat.com>
4146
4147 PR c++/64767
4148 * c-parser.c (c_parser_postfix_expression): Mark zero character
4149 constants by setting original_type in c_expr.
4150 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4151 with a zero character constant.
4152 (char_type_p): New function.
4153
5dd9a9d0
DM
41542017-01-04 David Malcolm <dmalcolm@redhat.com>
4155
4156 * c-parser.c (c_parser_declaration_or_fndef): Create a
4157 rich_location at init_loc and parse it to start_init.
4158 (last_init_list_comma): New global.
4159 (c_parser_braced_init): Update last_init_list_comma when parsing
4160 commas. Pass it to pop_init_level. Pass location of closing
4161 brace to pop_init_level.
4162 (c_parser_postfix_expression_after_paren_type): Create a
4163 rich_location at type_loc and parse it to start_init.
4164 (c_parser_omp_declare_reduction): Likewise for loc.
4165 * c-tree.h (start_init): Add rich_location * param.
4166 (pop_init_level): Add location_t param.
4167 * c-typeck.c (struct initializer_stack): Add field
4168 "missing_brace_richloc".
4169 (start_init): Add richloc param, use it to initialize
4170 the stack node's missing_brace_richloc.
4171 (last_init_list_comma): New decl.
4172 (finish_implicit_inits): Pass last_init_list_comma to
4173 pop_init_level.
4174 (push_init_level): When finding missing open braces, add fix-it
4175 hints to the richloc.
4176 (pop_init_level): Add "insert_before" param and pass it
4177 when calling pop_init_level. Add fixits about missing
4178 close braces to any richloc. Use the richloc for the
4179 -Wmissing-braces warning.
4180 (set_designator): Pass last_init_list_comma to pop_init_level.
4181 (process_init_element): Likewise.
4182
cbe34bb5
JJ
41832017-01-01 Jakub Jelinek <jakub@redhat.com>
4184
4185 Update copyright years.
4186
d17680f3
JJ
41872016-12-21 Jakub Jelinek <jakub@redhat.com>
4188
0dba7960
JJ
4189 PR bootstrap/78817
4190 * c-typeck.c (build_function_call_vec): If check_function_arguments
4191 returns true, set TREE_NO_WARNING on CALL_EXPR.
4192
d17680f3
JJ
4193 PR c/77767
4194 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4195 to *expr instead of overwriting it.
4196
aa90531e
RB
41972016-12-20 Richard Biener <rguenther@suse.de>
4198
4199 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4200 error recovery.
4201 (c_parser_gimple_statement): Only build assigns for non-error
4202 stmts.
4203 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4204
629b3d75
MJ
42052016-12-14 Martin Jambor <mjambor@suse.cz>
4206
4207 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4208 omp-low.h.
4209 (c_finish_oacc_routine): Adjusted call to
4210 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4211 to use their new names.
4212 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4213 use its new name.
4214 (c_parser_oacc_update): Likewise.
4215 (c_parser_omp_simd): Likewise.
4216 (c_parser_omp_target_update): Likewise.
4217 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4218 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4219 name.
4220 (c_finish_omp_cancellation_point): Likewise.
4221 * gimple-parser.c: Do not include omp-low.h
4222
c5af52eb
CP
42232016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4224 James Norris <jnorris@codesourcery.com>
4225
4226 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4227 EXIT_DATA,WAIT} are not used in compound statements.
4228 (c_parser_oacc_enter_exit_data): Update diagnostics.
4229
48330c93
BE
42302016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4231
4232 PR c++/71973
4233 * c-decl.c (diagnose_mismatched_decls): Use
4234 OPT_Wbuiltin_declaration_mismatch here too.
4235
899ca90e 42362016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4237 Alan Hayward <alan.hayward@arm.com>
4238 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4239
4240 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4241 (make_label, finish_struct): Likewise.
4242
1ee62b92 42432016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4244 Richard Biener <rguenther@suse.de>
22b15758 4245
8e745a17
JJ
4246 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4247 * config-lang.in (gtfiles): Add c/c-parser.h.
4248 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4249 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4250 * c-parser.c (enum c_id_kind, struct c_token,
4251 c_parser_next_token_is, c_parser_next_token_is_not,
4252 c_parser_next_token_is_keyword,
4253 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4254 Split out to ...
4255 * c-parser.h: ... new header.
4256 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4257 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4258 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4259 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4260 c_parser_error, c_parser_require, c_parser_skip_until_found,
4261 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4262 c_parser_type_name): Export.
4263 (c_parser_tokens_buf): New function.
4264 (c_parser_error): Likewise.
4265 (c_parser_set_error): Likewise.
4266 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4267 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4268 via c_parser_parse_gimple_body.
8e745a17
JJ
4269 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4270 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4271 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4272 c_parser_error, c_parser_require, c_parser_skip_until_found,
4273 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4274 c_parser_type_name): Declare.
1ee62b92
PG
4275 (struct c_parser): Declare forward.
4276 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4277 (c_parser_error): Likewise.
4278 (c_parser_set_error): Likewise.
4279 * gimple-parser.c: New file.
4280 * gimple-parser.h: Likewise.
1ee62b92 4281
22b15758
UB
42822016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4283
4284 PR c/35503
4285 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4286 warn_for_restrict.
4287
84ff4775
LCW
42882016-09-11 Le-Chun Wu <lcwu@google.com>
4289 Mark Wielaard <mjw@redhat.com>
4290
4291 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4292 to the given -Wshadow= variant.
4293
4d0cdd0c
TP
42942016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4295
4296 * c-typeck.c: Include memmodel.h.
4297
1202f33e
JJ
42982016-10-13 Jakub Jelinek <jakub@redhat.com>
4299
4300 PR target/77957
4301 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4302 instead of lhd_return_null_tree_v.
4303
8a14afd0
BS
43042016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4305
4306 PR c++/69733
4307 * c-decl.c (smallest_type_quals_location): New static function.
4308 (grokdeclarator): Try to find the correct location for an ignored
4309 qualifier.
4310
81fea426
MP
43112016-09-26 Marek Polacek <polacek@redhat.com>
4312
4313 PR c/7652
4314 * c-decl.c (pop_scope): Add gcc_fallthrough.
4315
43162016-09-26 Marek Polacek <polacek@redhat.com>
4317
4318 PR c/7652
4319 * c-parser.c (struct c_token): Add flags field.
4320 (c_lex_one_token): Pass it to c_lex_with_flags.
4321 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4322 into IFN_FALLTHROUGH.
4323 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4324 attribute fallthrough after a case label or default label.
4325 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4326
9a2300e9
MP
43272016-09-24 Marek Polacek <polacek@redhat.com>
4328
4329 PR c/77490
4330 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4331 have boolean value. Warn about ++/-- on booleans.
4332
7de76362
JJ
43332016-09-23 Jakub Jelinek <jakub@redhat.com>
4334
4335 * c-parser.c (incomplete_record_decls): Remove unnecessary
4336 = vNULL initialization of file scope vec.
4337
5b73d2ab
MP
43382016-09-16 Marek Polacek <polacek@redhat.com>
4339
4340 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4341
e51fbec3
MP
43422016-09-14 Marek Polacek <polacek@redhat.com>
4343
4344 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4345 (fix_array_notation_expr): Likewise.
4346 * c-decl.c (finish_decl): Likewise.
4347 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4348 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4349 (function_to_pointer_conversion): Use false instead of 0.
4350 (convert_lvalue_to_rvalue): Likewise.
4351 (parser_build_unary_op): Likewise.
4352 (build_atomic_assign): Likewise.
4353 (build_unary_op): Change nonconvert parameter type to bool, use
4354 true/false instead of 1/0.
4355 (build_binary_op): Use true instead of 1.
4356
254830ba
DM
43572016-09-13 David Malcolm <dmalcolm@redhat.com>
4358
4359 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4360 of add_fixit_insert to add_fixit_insert_before.
4361
4c13ba17
MP
43622016-09-13 Marek Polacek <polacek@redhat.com>
4363
4364 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4365 it.
4366
54dcdb88
BE
43672016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4368
4369 PR c++/77496
4370 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4371 COMPOUND_EXPR to warn_for_omitted_condop.
4372
e5106e27
DM
43732016-09-07 David Malcolm <dmalcolm@redhat.com>
4374
4375 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4376 c_get_substring_location for this new langhook.
4377
9dc5773f
JJ
43782016-09-02 Jakub Jelinek <jakub@redhat.com>
4379
4380 PR c/65467
4381 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4382 flag_openmp.
4383 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4384 instead of mark_exp_read on low_bound/length expression.
4385 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4386 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4387 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4388 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4389 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4390 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4391 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4392 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4393 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4394 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4395 instead of mark_expr_read.
4396 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4397 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4398 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4399 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4400 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4401 array section bases outside of depend clause, for depend clause
4402 use convert_lvalue_to_rvalue on the base.
4403 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4404 linear, aligned, map, to and from clauses.
4405 (c_omp_clause_copy_ctor): New function.
4406
295844f6
MP
44072016-09-01 Marek Polacek <polacek@redhat.com>
4408
4409 PR c/7652
4410 * c-typeck.c (composite_type): Add FALLTHRU comment.
4411
089af25c
DM
44122016-08-31 David Malcolm <dmalcolm@redhat.com>
4413
4414 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4415 to the insertion fixits for "struct", "union", and "enum".
4416
f9087798
DM
44172016-08-30 David Malcolm <dmalcolm@redhat.com>
4418
4419 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4420 rather than add_fixit_misspelled_id.
4421 (undeclared_variable): Likewise.
4422 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4423 now-redundant "here" params from add_fixit_insert method calls.
4424 (c_parser_parameter_declaration): Likewise.
4425 * c-typeck.c (build_component_ref): Remove now-redundant range
4426 param from add_fixit_replace method calls.
4427
ebef225f
MP
44282016-08-25 Marek Polacek <polacek@redhat.com>
4429
4430 * c-typeck.c (parser_build_binary_op): Pass LHS to
4431 warn_logical_not_parentheses.
4432
fe377a48
MP
44332016-08-25 Marek Polacek <polacek@redhat.com>
4434
4435 PR c/77323
4436 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4437 or _FloatN or _FloatNx is not supported.
4438 (finish_declspecs): Set type to integer_type_node when _FloatN or
4439 _FloatNx is not supported.
4440
c65699ef
JM
44412016-08-19 Joseph Myers <joseph@codesourcery.com>
4442
4443 PR c/32187
4444 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4445 (struct c_declspecs): Add field floatn_nx_idx.
4446 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4447 and _FloatNx type specifiers.
4448 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4449 (c_parser_declspecs, c_parser_attribute_any_word)
4450 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4451 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4452 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4453 narrower than double.
4454
2f1364c2
JJ
44552016-08-12 Jakub Jelinek <jakub@redhat.com>
4456 Martin Liska <mliska@suse.cz>
4457
4458 PR c/67410
4459 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4460 % to determine val element to change. Assert that
4461 wchar_bytes * charwidth fits into val array.
4462
191816a3
MP
44632016-08-12 Marek Polacek <polacek@redhat.com>
4464
4465 PR c/7652
4466 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4467 (c_parser_postfix_expression): Likewise.
4468 * c-typeck.c (build_unary_op): Adjust fall through comment.
4469 (c_mark_addressable): Likewise.
4470
b95a64bb
JJ
44712016-08-11 Jakub Jelinek <jakub@redhat.com>
4472
4473 PR c/72816
4474 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4475 array member through typedef, for orig_qual_indirect == 0 clear
4476 orig_qual_type.
4477
895aa8e1
DM
44782016-08-08 David Malcolm <dmalcolm@redhat.com>
4479
4480 PR c/64955
4481 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4482 this up to selftest::run_c_tests.
4483 (selftest::run_c_tests): New function.
4484
0b212d8c
TS
44852016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4486
ae9281fc
TS
4487 * c-parser.c (struct oacc_routine_data): Add error_seen and
4488 fndecl_seen members.
4489 (c_finish_oacc_routine): Use these.
4490 (c_parser_declaration_or_fndef): Adjust.
4491 (c_parser_oacc_routine): Likewise. Support more C language
4492 constructs, and improve diagnostics. Move pragma context
4493 checking...
4494 (c_parser_pragma): ... here.
4495
0b212d8c
TS
4496 * c-parser.c (struct oacc_routine_data): New.
4497 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4498 Simplify code.
4499 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4500 declare target" attribute.
4501
76e2c821
JB
45022016-08-01 Jan Beulich <jbeulich@suse.com>
4503
4504 * c-fold.c (c_fully_fold_internal): Also emit shift count
4505 warnings for vector types.
4506 * c-typeck.c (build_binary_op): Likewise.
4507
f618a472
MP
45082016-07-29 Marek Polacek <polacek@redhat.com>
4509
4510 PR c/71742
4511 * c-decl.c (finish_struct): Rephrase an error message.
4512
efd0786f
MP
4513 PR c/71853
4514 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4515 to error node for invalid code.
4516
e00dceaf
MP
4517 PR c/71573
4518 * c-decl.c (implicitly_declare): Return decl early not only for
4519 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4520
673a107a
JJ
45212016-07-29 Jakub Jelinek <jakub@redhat.com>
4522
4523 PR c/71969
4524 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4525 on GNU extern inline functions.
4526
a5b5c8b6
MP
45272016-07-29 Marek Polacek <polacek@redhat.com>
4528
4529 PR c/71583
4530 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4531 check expr.value.
4532
e3fe09c1
UB
45332016-07-22 Uros Bizjak <ubizjak@gmail.com>
4534
4535 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4536
7c8f7eaa
DM
45372016-07-20 David Malcolm <dmalcolm@redhat.com>
4538
4539 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4540 spellcheck-tree.h
4541 (best_macro_match): Likewise, converting from a typedef to a
4542 subclass.
4543 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4544 (lookup_name_fuzzy): Update for change of best_macro_match to a
4545 subclass with a ctor that calls cpp_forall_identifiers.
4546
de6a69ee
DM
45472016-07-20 David Malcolm <dmalcolm@redhat.com>
4548
4549 * c-decl.c (implicit_decl_warning): Update for conversion of
4550 return type of lookup_name_fuzzy to const char *.
4551 (undeclared_variable): Likewise.
4552 (lookup_name_fuzzy): Convert return type from tree to
4553 const char *.
4554 * c-parser.c (c_parser_declaration_or_fndef): Update for
4555 conversion of return type of lookup_name_fuzzy to const char *.
4556 (c_parser_parameter_declaration): Likewise.
4557
b1c9c068
CP
45582016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4559
4560 * c-parser.c (c_parser_oacc_declare): Don't scan for
4561 GOMP_MAP_POINTER.
4562 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4563 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4564 zero-length subarrays.
4565
ddbbcb19
JJ
45662016-07-15 Jakub Jelinek <jakub@redhat.com>
4567
4568 PR c/71858
4569 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4570 instead of FUZZY_LOOKUP_NAME.
4571 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4572 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4573
dd36b877
JJ
45742016-07-14 Jakub Jelinek <jakub@redhat.com>
4575
4576 PR c/71858
4577 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4578
8c681247
TS
45792016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4580
4581 * c-parser.c (c_parser_generic_selection): Make type of variable
4582 auto_vec.
4583 (c_parser_omp_declare_simd): Likewise.
4584
bf4fa671
TS
45852016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4586
4587 * c-decl.c (struct c_struct_parse_info): Change member types
4588 from vec to auto_vec.
4589 (start_struct): Adjust.
4590 (finish_struct): Likewise.
4591
557e8c49
JJ
45922016-07-02 Jakub Jelinek <jakub@redhat.com>
4593
4594 PR c/71719
4595 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4596
54d19c3b
TS
45972016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4598
4599 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4600 Move pragma context checking into...
4601 (c_parser_omp_cancellation_point): ... here, and improve
4602 diagnostic messages.
4603 * c-typeck.c (c_finish_omp_cancel)
4604 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4605
152ef731
JJ
46062016-06-29 Jakub Jelinek <jakub@redhat.com>
4607
4608 PR c/71685
4609 * c-typeck.c (c_build_qualified_type): Don't clear
4610 C_TYPE_INCOMPLETE_VARS for the main variant.
4611
46122016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4613
4614 PR c/71552
4615 * c-typeck.c (output_init_element): Diagnose incompatible types
4616 before non-constant initializers.
4617
e9ac1f86
JJ
46182016-06-28 Jakub Jelinek <jakub@redhat.com>
4619
4620 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4621
277d7ee0
AK
46222016-06-23 Andi Kleen <ak@linux.intel.com>
4623
4624 * Make-lang.in: Add support for autofdo.
4625
1a4f11c8
DM
46262016-06-22 David Malcolm <dmalcolm@redhat.com>
4627
4628 PR c/70339
4629 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4630 (implicit_decl_warning): When issuing warnings for implicit
4631 declarations, attempt to provide a suggestion via
4632 lookup_name_fuzzy.
4633 (undeclared_variable): Likewise when issuing errors.
4634 (lookup_name_in_scope): Likewise.
4635 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4636 (best_macro_match): New typedef.
4637 (find_closest_macro_cpp_cb): New function.
4638 (lookup_name_fuzzy): New function.
4639 * c-parser.c: Include gcc-rich-location.h.
4640 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4641 (c_keyword_starts_typename): ...this new function.
4642 (c_parser_declaration_or_fndef): When issuing errors about
4643 missing "struct" etc, add a fixit. For other kinds of errors,
4644 attempt to provide a suggestion via lookup_name_fuzzy.
4645 (c_parser_parms_declarator): When looking ahead to detect typos in
4646 type names, also reject CPP_KEYWORD.
4647 (c_parser_parameter_declaration): When issuing errors about
4648 unknown type names, attempt to provide a suggestion via
4649 lookup_name_fuzzy.
4650 * c-tree.h (c_keyword_starts_typename): New prototype.
4651
5a578671
JM
46522016-06-20 Joseph Myers <joseph@codesourcery.com>
4653
4654 PR c/71601
4655 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4656 c_common_type returns error_mark_node.
4657
3f8257db 46582016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4659
4660 PR c/69507
4661 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4662 __alignof__ (expression).
4663
6a3f203c
DM
46642016-06-14 David Malcolm <dmalcolm@redhat.com>
4665
4666 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4667
264757fb
DM
46682016-06-14 David Malcolm <dmalcolm@redhat.com>
4669
4670 * c-typeck.c (build_component_ref): Simplify fixit code by
4671 using gcc_rich_location::add_fixit_misspelled_id.
4672 (set_init_label): Likewise.
4673
f7e4f2e3
DM
46742016-06-13 David Malcolm <dmalcolm@redhat.com>
4675
4676 * c-parser.c (c_parser_initelt): Provide location of name for new
4677 location_t param of set_init_label.
4678 * c-tree.h (set_init_label): Add location_t param.
4679 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4680 param and use it when issuing error messages about unrecognized
4681 field names. Attempt to provide a fixit hint if appropriate,
4682 otherwise update the error message to provide the type name.
4683
4b1ffdb1
TS
46842016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4685
4686 PR c/71381
4687 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4688 Loosen checking.
4689
44a845ca
MS
46902016-06-08 Martin Sebor <msebor@redhat.com>
4691 Jakub Jelinek <jakub@redhat.com>
4692
4693 PR c++/70507
4694 PR c/68120
4695 * c-typeck.c (convert_arguments): Don't promote last argument
4696 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4697
92a5f2ba
MP
46982016-06-08 Marek Polacek <polacek@redhat.com>
4699
4700 PR c/71418
4701 * c-decl.c (grokdeclarator): Check TYPE_P.
4702
08203f73
MP
4703 PR c/71426
4704 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4705 code.
4706
6ffd47b7
DM
47072016-06-07 David Malcolm <dmalcolm@redhat.com>
4708
4709 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4710 and structure element reference, capture the location of the
4711 element name token and pass it to build_component_ref.
4712 (c_parser_postfix_expression_after_primary): Likewise for
4713 structure element dereference.
4714 (c_parser_omp_variable_list): Likewise for
4715 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4716 * c-tree.h (build_component_ref): Add location_t param.
4717 * c-typeck.c (build_component_ref): Add location_t param
4718 COMPONENT_LOC. Use it, if available, when issuing hints about
4719 mispelled member names to provide a fixit replacement hint.
4720
1f40cff3
MP
47212016-06-06 Marek Polacek <polacek@redhat.com>
4722
4723 PR c/71362
4724 * c-parser.c (c_parser_direct_declarator): Set location.
4725
5545a907
MP
47262016-06-06 Marek Polacek <polacek@redhat.com>
4727
4728 * c-typeck.c (comptypes_internal): Handle comparisons of
4729 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4730 TYPE_REF_CAN_ALIAS_ALL.
4731
b605f663
CLT
47322016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4733
4734 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4735 arguments as addressable when async clause exists.
4736
00631022
JJ
47372016-05-30 Jakub Jelinek <jakub@redhat.com>
4738
4739 PR c++/71349
4740 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4741 when combined with target construct.
4742
7211a097
JJ
47432016-05-26 Jakub Jelinek <jakub@redhat.com>
4744
4745 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4746 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4747
95efe6b6
MP
47482016-05-25 Marek Polacek <polacek@redhat.com>
4749
4750 PR c/71265
4751 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4752
a23faf7a
MP
4753 PR c/71266
4754 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4755
e46c7770
CP
47562016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4757
4758 * c-parser.c (c_parser_oacc_declare): Add support for
4759 GOMP_MAP_FIRSTPRIVATE_POINTER.
4760 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4761 argument with enum c_omp_region_type ort.
4762 (handle_omp_array_sections): Likewise. Update call to
4763 handle_omp_array_sections_1.
4764 (c_finish_omp_clauses): Add specific errors and warning messages for
4765 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4766 call to handle_omp_array_sections.
4767
a04e69c0
TS
47682016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4769
4770 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4771
f17a223d
RB
47722016-05-24 Richard Biener <rguenther@suse.de>
4773
4774 PR middle-end/70434
4775 PR c/69504
4776 * c-typeck.c (build_array_ref): Do not complain about indexing
4777 non-lvalue vectors. Adjust for function name change.
4778
79063edd
MS
47792016-05-20 Martin Sebor <msebor@redhat.com>
4780
4781 PR c/71115
4782 * c-typeck.c (error_init): Use
4783 expansion_point_location_if_in_system_header.
4784 (warning_init): Same.
4785
8a40fef3
DM
47862016-05-19 David Malcolm <dmalcolm@redhat.com>
4787
4788 PR c/71171
4789 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4790 in error-handling.
4791 (c_parser_postfix_expression): Likewise.
4792 * c-tree.h (c_expr::set_error): New method.
4793 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4794 that result's range is initialized.
4795
e9892350
JG
47962016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4797
4798 * c-typeck.c (parser_build_unary_op): Fix formatting.
4799
8fad45f5
MW
48002016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4801
4802 * c-decl.c (grokdeclarator): Remove errmsg and use of
4803 targetm.invalid_return_type.
4804 (grokparms): Remove errmsg and use of
4805 targetm.invalid_parameter_type.
4806
aa4b467b
JM
48072016-05-13 Joseph Myers <joseph@codesourcery.com>
4808
4809 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4810 function return type.
4811
4f2e1536
MP
48122016-05-12 Marek Polacek <polacek@redhat.com>
4813
4814 PR c/70756
4815 * c-decl.c (build_compound_literal): Pass LOC down to
4816 c_incomplete_type_error.
4817 * c-tree.h (require_complete_type): Adjust declaration.
4818 (c_incomplete_type_error): Likewise.
4819 * c-typeck.c (require_complete_type): Add location parameter, pass it
4820 down to c_incomplete_type_error.
4821 (c_incomplete_type_error): Add location parameter, pass it down to
4822 error_at.
4823 (build_component_ref): Pass location down to c_incomplete_type_error.
4824 (default_conversion): Pass location down to require_complete_type.
4825 (build_array_ref): Likewise.
4826 (build_function_call_vec): Likewise.
4827 (convert_arguments): Likewise.
4828 (build_unary_op): Likewise.
4829 (build_c_cast): Likewise.
4830 (build_modify_expr): Likewise.
4831 (convert_for_assignment): Likewise.
4832 (c_finish_omp_clauses): Likewise.
4833
d6e83a8d
MM
48342016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4835
4836 PR c/43651
4837 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4838 is enabled.
4839 * c-errors.c (pedwarn_c90): Return true if warned.
4840 * c-tree.h (pedwarn_c90): Change return type to bool.
4841 (enum c_declspec_word): Add new enumerator cdw_atomic.
4842
5c3a10fb
MP
48432016-05-11 Marek Polacek <polacek@redhat.com>
4844
4845 PR c++/71024
4846 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4847 diagnose_mismatched_attributes and call it.
4848
cf68d92c
MP
48492016-05-10 Marek Polacek <polacek@redhat.com>
4850
4851 PR c/70255
4852 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4853 on a declaration following the definition.
4854
351f85c5
JJ
48552016-05-05 Jakub Jelinek <jakub@redhat.com>
4856
4857 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4858 parse it through to c_parser_c99_block_statement.
4859 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4860 caller.
4861
deef7113
MP
48622016-05-04 Marek Polacek <polacek@redhat.com>
4863
4864 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4865 OPT_Wdangling_else.
4866
de55efd5
MP
48672016-05-04 Marek Polacek <polacek@redhat.com>
4868
4869 PR c/48778
4870 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4871 for macro expansions.
4872
79ce98bc
MP
48732016-05-03 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/70859
4876 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4877 check_builtin_function_arguments.
4878
fb2647aa
RB
48792016-05-03 Richard Biener <rguenther@suse.de>
4880
4881 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4882 the checksum from the previous stage.
4883
77886428
CP
48842016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4885
4886 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4887 c_finish_omp_clauses.
4888 (c_parser_omp_all_clauses): Likewise.
4889 (c_parser_oacc_cache): Likewise.
4890 (c_parser_oacc_loop): Likewise.
4891 (omp_split_clauses): Likewise.
4892 (c_parser_omp_declare_target): Likewise.
4893 (c_parser_cilk_all_clauses): Likewise.
4894 (c_parser_cilk_for): Likewise.
4895 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4896 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4897
7176a4a0
MP
48982016-05-02 Marek Polacek <polacek@redhat.com>
4899
4900 PR c/70851
4901 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4902 incomplete type.
4903
e7ff0319
CP
49042016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4905
4906 PR middle-end/70626
4907 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4908 OACC_LOOP_CLAUSE_MASK.
4909 (c_parser_oacc_kernels_parallel): Update call to
4910 c_oacc_split_loop_clauses.
4911
9f405ce1
AM
49122016-04-28 Andrew MacLeod <amacleod@redhat.com>
4913
4914 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4915 argument to build_modify_expr in two cases.
4916
c1e1f433
BS
49172016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4918
4919 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4920 warn_for_memset instead of warning directly here.
4921
2448a956
MP
49222016-04-26 Marek Polacek <polacek@redhat.com>
4923
4924 PR c/67784
4925 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4926 out of ...
4927 (c_parser_for_statement): ... here.
4928 (c_parser_if_statement): Use it.
4929 (c_parser_switch_statement): Use it.
4930 (c_parser_while_statement): Use it.
4931
b02a5e26
MP
4932 PR c/70791
4933 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4934
477d4906
IV
49352016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4936
4937 PR c++/69363
4938 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4939 instead of c_finish_cilk_clauses.
4940 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4941 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4942 floating-point variables in the linear clause for Cilk Plus.
4943
fe37c7af
MM
49442016-04-18 Michael Matz <matz@suse.de>
4945
4946 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4947 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4948
949505a9
MP
49492016-04-15 Marek Polacek <polacek@redhat.com>
4950
4951 PR c/70671
4952 * c-typeck.c (build_unary_op): Pass location down to error and
4953 warning call.
4954
dda1bf61
JJ
49552016-04-15 Jakub Jelinek <jakub@redhat.com>
4956
4957 PR c/70436
4958 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4959 where needed.
4960 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4961 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4962 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4963 Adjust c_parser_pragma callers.
4964 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4965 caller.
4966 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4967 c_parser_statement.
4968 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4969 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4970 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4971 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4972 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4973 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4974 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4975 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4976 down where needed.
4977 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4978 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4979 calls.
4980
99cd9857
MP
49812016-04-13 Marek Polacek <polacek@redhat.com>
4982
4983 PR c/70436
4984 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4985 adjust callers.
4986 (c_parser_statement): Likewise.
4987 (c_parser_c99_block_statement): Likewise.
4988 (c_parser_while_statement): Likewise.
4989 (c_parser_for_statement): Likewise.
4990 (c_parser_if_body): Don't set IF_P here.
4991 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4992 about dangling else here.
4993 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4994 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4995 warn about dangling else here.
4996
f13355da
MP
49972016-04-04 Marek Polacek <polacek@redhat.com>
4998
4999 PR c/70307
5000 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5001
5fde6a45
MP
50022016-03-31 Marek Polacek <polacek@redhat.com>
5003
5004 PR c/70297
5005 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5006
4bbf545b
DM
50072016-03-18 David Malcolm <dmalcolm@redhat.com>
5008
5009 PR c/70281
5010 * c-parser.c (c_parser_postfix_expression): Set the source range
5011 for uses of "__builtin_types_compatible_p".
5012
fcc2b74f
JJ
50132016-03-17 Jakub Jelinek <jakub@redhat.com>
5014
5015 PR c/70280
5016 * c-typeck.c (composite_type): Don't count void_list_node
5017 into len, if the list is terminated by void_list_node, start
5018 with void_list_node instead of NULL for newargs. Stop
5019 at void_list_node.
5020
ab4c578f
MP
50212016-03-16 Marek Polacek <polacek@redhat.com>
5022
5023 PR c/70093
5024 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5025 nested functions returning VM types.
5026
96b3c82d
CP
50272016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5028
5029 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5030 when calling c_finish_omp_clauses.
5031
29b9828f
BS
50322016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5033
5034 PR c/69824
5035 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5036 for later.
5037
7ff6ca38
MP
50382016-03-04 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/69798
5041 * c-parser.c (c_parser_postfix_expression): Call
5042 c_parser_cast_expression rather than c_parser_postfix_expression.
5043
686e2237
JJ
50442016-03-01 Jakub Jelinek <jakub@redhat.com>
5045
5046 PR c/69796
5047 PR c/69974
5048 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5049 of incomplete decls to error_mark_node.
5050
0b05329b
MP
50512016-02-24 Marek Polacek <polacek@redhat.com>
5052
5053 PR c/69819
5054 * c-decl.c (finish_decl): Don't update the copy of the type of a
5055 different decl type.
5056
067fbd8b
JJ
50572016-02-23 Jakub Jelinek <jakub@redhat.com>
5058
5059 PR objc/69844
5060 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5061 in id_kind reclassification.
5062
bf14eba2
JJ
50632016-02-16 Jakub Jelinek <jakub@redhat.com>
5064
5065 PR c/69835
5066 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5067
ba539195
JN
50682016-02-16 James Norris <jnorris@codesourcery.com>
5069
5070 PR c/64748
5071 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5072
16595a1f
BS
50732016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5074
f48dfe98
BS
5075 * c-decl.c (build_null_declspecs): Zero the entire struct.
5076
16595a1f
BS
5077 PR c/69522
5078 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5079 callers changed. If nested_p is true, use it to call
5080 finish_implicit_inits.
5081 * c-tree.h (finish_implicit_inits): Declare.
5082 * c-typeck.c (finish_implicit_inits): New function. Move code
5083 from ...
5084 (push_init_level): ... here.
5085 (set_designator, process_init_element): Call finish_implicit_inits.
5086
66756373
JJ
50872016-02-11 Jakub Jelinek <jakub@redhat.com>
5088
5089 PR c/69768
5090 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5091 arguments for -Waddress warning.
5092
1066e9b5
JJ
50932016-02-04 Jakub Jelinek <jakub@redhat.com>
5094
5095 PR c/69669
5096 * c-decl.c (finish_enum): When honoring mode attribute,
5097 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5098
3a5d2ba4
JJ
50992016-01-29 Jakub Jelinek <jakub@redhat.com>
5100
5101 PR debug/69518
5102 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5103 all type variants, not just TYPE_MAIN_VARIANT.
5104
cbdd8ae0
JJ
51052016-01-27 Jakub Jelinek <jakub@redhat.com>
5106
5107 PR debug/66869
5108 * c-decl.c (c_write_global_declarations_1): Warn with
5109 warn_unused_function if static prototype without definition
5110 is not C_DECL_USED.
5111
fa74a4bc
MP
51122016-01-27 Marek Polacek <polacek@redhat.com>
5113
5114 PR c/68062
5115 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5116 to unsigned, if needed. Add -Wsign-compare warning.
5117
13f92e8d
JJ
51182016-01-26 Jakub Jelinek <jakub@redhat.com>
5119
5120 PR tree-optimization/69483
5121 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5122
cd8e73dc 51232016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5124
5125 PR c/24293
5126 * c-tree.h (incomplete_record_decls): Declare.
5127 * c-parser.c (incomplete_record_decls): Define.
5128 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5129 report error if any decl has zero size.
5130 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5131 or enum type to incomplete_record_decls.
5132
e6d6ec9e
TV
51332016-01-14 Tom de Vries <tom@codesourcery.com>
5134
5135 PR tree-optimization/68773
5136 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5137 set force_output.
5138
00083992
MP
51392016-01-14 Marek Polacek <polacek@redhat.com>
5140
5141 PR c/69262
5142 * c-decl.c (grokdeclarator): Provide more information for invalid
5143 array declarations.
5144
7443cf13
DM
51452016-01-06 David Malcolm <dmalcolm@redhat.com>
5146
5147 * c-parser.c (c_parser_unary_expression): For dereferences, build
5148 a combined location before calling build_indirect_ref, so that
5149 error reports cover the full range, manually updating the c_expr
5150 src_range.
5151
6b131d5b
MP
51522016-01-06 Marek Polacek <polacek@redhat.com>
5153
5154 PR sanitizer/69099
5155 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5156 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5157 NULL.
5158
818ab71a
JJ
51592016-01-04 Jakub Jelinek <jakub@redhat.com>
5160
5161 Update copyright years.
5162
2fe0a208
MP
51632016-01-04 Marek Polacek <polacek@redhat.com>
5164
5165 PR c/68908
5166 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5167 optimization to use __atomic_fetch_* built-in if possible.
5168
c7b48c8a
TS
51692015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5170
5171 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5172 into...
5173 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5174 all users.
5175
fda5652f
MP
51762015-12-22 Marek Polacek <polacek@redhat.com>
5177
5178 PR c/69002
5179 * c-typeck.c (build_component_ref): Warn when acessing elements of
5180 atomic structures or unions.
5181
745e411d
DM
51822015-12-21 David Malcolm <dmalcolm@redhat.com>
5183
5184 * c-typeck.c: Include "gcc-rich-location.h".
5185 (build_binary_op): In the two places that call binary_op_error,
5186 create a gcc_rich_location and populate it with the location of
5187 the binary op and its two operands.
5188
94c40e19
DM
51892015-12-16 David Malcolm <dmalcolm@redhat.com>
5190
5191 * c-parser.c (c_parser_statement_after_labels): When calling
5192 c_finish_return, Use the return expression's location if it has
5193 one, falling back to the location of the first token within it.
5194 * c-typeck.c (c_finish_return): When issuing warnings about
5195 the incorrect presence/absence of a return value, issue a note
5196 showing the declaration of the function.
5197
de67c4c3
DM
51982015-12-16 David Malcolm <dmalcolm@redhat.com>
5199
5200 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5201 to 4.
5202 (c_parser_peek_nth_token): New function.
5203 (c_parser_peek_conflict_marker): New function.
5204 (c_parser_error): Detect conflict markers and report them as such.
5205
a10704e1
DM
52062015-12-16 David Malcolm <dmalcolm@redhat.com>
5207
5208 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5209 to preserve range information for the primary expression
5210 in the call to c_parser_postfix_expression_after_primary.
5211
8062bca6
DM
52122015-12-16 David Malcolm <dmalcolm@redhat.com>
5213
5214 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5215 expression location, falling back on the first token location,
5216 rather than always using the latter.
5217
d06f8b75
MP
52182015-12-16 Marek Polacek <polacek@redhat.com>
5219
5220 PR c/64637
5221 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5222 available.
5223
2994fb91
MP
52242015-12-15 Marek Polacek <polacek@redhat.com>
5225
5226 PR c/68907
5227 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5228 artificial decl.
5229
a1b93f8d
DM
52302015-12-08 David Malcolm <dmalcolm@redhat.com>
5231
5232 * c-parser.c (c_parser_alignof_expression): Capture location of
5233 closing parenthesis (if any), or of end of unary expression, and
5234 use it to build a src_range for the expression.
5235
46c6e1e2
DM
52362015-12-08 David Malcolm <dmalcolm@redhat.com>
5237
5238 PR c/68757
5239 * c-parser.c (c_parser_get_builtin_args): Add
5240 "out_close_paren_loc" param, and write back to it.
5241 (c_parser_postfix_expression): Capture the closing
5242 parenthesis location for RID_CHOOSE_EXPR,
5243 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5244 RID_BUILTIN_SHUFFLE and use it to set the source range
5245 for such expressions; within RID_BUILTIN_COMPLEX set
5246 the underlying location.
5247
66189108
MP
52482015-12-07 Marek Polacek <polacek@redhat.com>
5249
5250 PR c/68668
5251 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5252 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5253
f187980b
EB
52542015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5255
5256 * c-tree.h (c_build_va_arg): Adjust prototype.
5257 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5258 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5259 parameter, adjust throughout and issue an error if EXPR is a component
5260 with reverse storage order.
5261
4250754e
JM
52622015-12-02 Jason Merrill <jason@redhat.com>
5263
5264 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5265 (c_fully_fold_internal, decl_constant_value_for_optimization):
5266 Move from c-common.c.
5267 * c-tree.h: Declare decl_constant_value_for_optimization.
5268 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5269
e9e32ee6
JM
52702015-12-02 Joseph Myers <joseph@codesourcery.com>
5271
5272 PR c/68162
5273 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5274 following link from declarator to next declarator. Track original
5275 qualified type and pass it to c_build_qualified_type.
5276 * c-typeck.c (c_build_qualified_type): Add arguments
5277 orig_qual_type and orig_qual_indirect.
5278
ff7a55bf
TS
52792015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5280
5281 * c-parser.c (c_parser_omp_clause_name)
5282 (c_parser_oacc_all_clauses): Alphabetical sorting.
5283
657e4e47
JJ
52842015-12-02 Jakub Jelinek <jakub@redhat.com>
5285
5286 PR c/68533
5287 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5288 for diagnostics.
5289
37d5ad46
JB
52902015-12-01 Julian Brown <julian@codesourcery.com>
5291 Cesar Philippidis <cesar@codesourcery.com>
5292 James Norris <James_Norris@mentor.com>
5293
5294 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5295 (c_parser_oacc_clause_use_device): New function.
5296 (c_parser_oacc_all_clauses): Add use_device support.
5297 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5298 (c_parser_oacc_host_data): New function.
5299 (c_parser_omp_construct): Add host_data support.
5300 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5301 * c-typeck.c (c_finish_oacc_host_data): New function.
5302 (c_finish_omp_clauses): Add use_device support.
5303
a4850ce9
JH
53042015-11-29 Jan Hubicka <hubicka@ucw.cz>
5305
5306 PR c/67106
5307 * c-decl.c: Set TYPE_PACKED in variants.
5308
b58d3df2
ML
53092015-11-27 Martin Liska <mliska@suse.cz>
5310
5311 PR c++/68312
5312 * c-array-notation.c (fix_builtin_array_notation_fn):
5313 Use release_vec_vec instead of vec::release.
5314 (build_array_notation_expr): Likewise.
5315 (fix_conditional_array_notations_1): Likewise.
5316 (fix_array_notation_expr): Likewise.
5317 (fix_array_notation_call_expr): Likewise.
5318
aec17bfe
JJ
53192015-11-27 Jakub Jelinek <jakub@redhat.com>
5320
5321 PR c/63326
5322 * c-parser.c (c_parser_compound_statement_nostart): If
5323 last_label is true, use pragma_stmt instead of pragma_compound
5324 as second c_parser_pragma argument.
5325 (c_parser_omp_ordered, c_parser_omp_target_update,
5326 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5327 false as second argument to c_parser_skip_to_pragma_eol after
5328 diagnosing standalone directives used in pragma_stmt context.
5329
688c4de0
IV
53302015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5331
5332 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5333 with "if (ENABLE_OFFLOADING)".
5334
cbd03aee
DM
53352015-11-23 David Malcolm <dmalcolm@redhat.com>
5336
5337 PR objc/68438
5338 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5339 for various Objective-C constructs: Class.name syntax,
5340 @selector(), @protocol(), @encode(), and [] message syntax.
5341
a87a86e1
DM
53422015-11-20 David Malcolm <dmalcolm@redhat.com>
5343
5344 PR 62314
5345 * c-typeck.c (should_suggest_deref_p): New function.
5346 (build_component_ref): Special-case POINTER_TYPE when
5347 generating a "not a structure of union" error message, and
5348 suggest a "->" rather than a ".", providing a fix-it hint.
5349
8ece8dfb
DM
53502015-11-19 David Malcolm <dmalcolm@redhat.com>
5351
5352 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5353 candidate into a new function, find_closest_identifier.
5354
433068cc
MP
53552015-11-19 Marek Polacek <polacek@redhat.com>
5356
5357 PR c/68412
5358 * c-typeck.c (parser_build_binary_op): Properly handle
5359 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5360
bef08b71
DM
53612015-11-17 David Malcolm <dmalcolm@redhat.com>
5362
5363 * c-parser.c (set_c_expr_source_range): Bulletproof both
5364 overloaded implementations against NULL expr->value.
5365 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5366 values.
5367 (c_parser_unary_expression): Likewise when handling addresses of
5368 labels.
5369 (c_parser_postfix_expression): Likewise for statement expressions,
5370 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5371 __builtin_va_arg, and for __builtin_offset_of.
5372 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5373 src_range using the range of the braced initializer.
5374 (c_parser_transaction_expression): Set src_range for "ret" to a
5375 sane pair of values.
5376
fff77217
KY
53772015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5378
5379 * c-parser.c (c_finish_omp_declare_simd): Look for
5380 "simd" attribute as well. Update error message.
5381
1d899da2
TS
53822015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5383
5384 * c-parser.c (c_parser_omp_declare_target): Adjust.
5385
e4606348
JJ
53862015-11-14 Jakub Jelinek <jakub@redhat.com>
5387
5388 * c-typeck.c (c_finish_omp_clauses): Don't mark
5389 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5390
3e636daf
MP
53912015-11-14 Marek Polacek <polacek@redhat.com>
5392
5393 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5394 * c-typeck.c: Likewise.
5395
ebedc9a3
DM
53962015-11-13 David Malcolm <dmalcolm@redhat.com>
5397
5398 * c-decl.c (warn_defaults_to): Pass line_table to
5399 rich_location ctor.
5400 * c-errors.c (pedwarn_c99): Likewise.
5401 (pedwarn_c90): Likewise.
5402 * c-parser.c (set_c_expr_source_range): New functions.
5403 (c_token::get_range): New method.
5404 (c_token::get_finish): New method.
5405 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5406 based on the range from the start of the LHS to the end of the
5407 RHS.
5408 (c_parser_conditional_expression): Likewise, based on the range
5409 from the start of the cond.value to the end of exp2.value.
5410 (c_parser_binary_expression): Call set_c_expr_source_range on
5411 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5412 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5413 based on the cast_loc through to the end of the expr.
5414 (c_parser_unary_expression): Likewise, based on the
5415 op_loc through to the end of op.
5416 (c_parser_sizeof_expression) Likewise, based on the start of the
5417 sizeof token through to either the closing paren or the end of
5418 expr.
5419 (c_parser_postfix_expression): Likewise, using the token range,
5420 or from the open paren through to the close paren for
5421 parenthesized expressions.
5422 (c_parser_postfix_expression_after_primary): Likewise, for
5423 various kinds of expression.
5424 * c-tree.h (struct c_expr): Add field "src_range".
5425 (c_expr::get_start): New method.
5426 (c_expr::get_finish): New method.
5427 (set_c_expr_source_range): New decls.
5428 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5429 on ret for prefix unary ops.
5430 (parser_build_binary_op): Likewise, running from the start of
5431 arg1.value through to the end of arg2.value.
5432
ec8b536f
MP
54332015-11-13 Marek Polacek <polacek@redhat.com>
5434
5435 PR c/68320
5436 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5437
277fe616
DM
54382015-11-13 David Malcolm <dmalcolm@redhat.com>
5439
5440 * c-typeck.c: Include spellcheck.h.
5441 (lookup_field_fuzzy_find_candidates): New function.
5442 (lookup_field_fuzzy): New function.
5443 (build_component_ref): If the field was not found, try using
5444 lookup_field_fuzzy and potentially offer a suggestion.
5445
6e232ba4
JN
54462015-11-12 James Norris <jnorris@codesourcery.com>
5447 Joseph Myers <joseph@codesourcery.com>
5448
5449 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5450 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5451 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5452 and PRAGMA_OMP_CLAUSE_LINK.
5453 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5454 and PRAGMA_OACC_CLAUSE_LINK.
5455 (OACC_DECLARE_CLAUSE_MASK): New definition.
5456 (c_parser_oacc_declare): New function.
5457
9be4f715
MP
54582015-11-12 Marek Polacek <polacek@redhat.com>
5459
5460 PR c/67784
5461 * c-parser.c (c_parser_for_statement): Reclassify the token in
5462 a correct scope.
5463
e78bede6
MP
54642015-11-11 Marek Polacek <polacek@redhat.com>
5465
5466 PR c/68107
5467 PR c++/68266
5468 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5469 checking the size of an array.
5470
69f293c9
AM
54712015-11-11 Andrew MacLeod <amacleod@redhat.com>
5472
5473 * c-array-notation.c: Remove unused header files.
5474 * c-aux-info.c: Likewise.
5475 * c-convert.c: Likewise.
5476 * c-decl.c: Likewise.
5477 * c-errors.c: Likewise.
5478 * c-lang.c: Likewise.
5479 * c-objc-common.c: Likewise.
5480 * c-parser.c: Likewise.
5481 * c-typeck.c: Likewise.
5482 * gccspec.c: Likewise.
5483
3a40d81d
NS
54842015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5485 Cesar Philippidis <cesar@codesourcery.com>
5486 James Norris <jnorris@codesourcery.com>
5487 Julian Brown <julian@codesourcery.com>
5488 Nathan Sidwell <nathan@codesourcery.com>
5489
3a40d81d
NS
5490 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5491 routine arg.
5492 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5493 (c_parser_pragma): Parse 'acc routine'.
5494 (OACC_ROUTINE_CLAUSE_MARK): Define.
5495 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5496
fc402eec
AA
54972015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5498
5499 PR debug/67192
5500 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5501 location of the backward-goto to the start of the loop body.
5502
f6b0b3db
AA
55032015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5504
5505 PR debug/67192
5506 * c-parser.c (c_parser_while_statement): Finish the loop before
5507 parsing ahead for misleading indentation.
5508 (c_parser_for_statement): Likewise.
5509
ee45a32d
EB
55102015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5511
5512 * c-decl.c (finish_struct): If the structure has reverse storage
5513 order, rewrite the type of array fields with scalar component. Call
5514 maybe_apply_pragma_scalar_storage_order on entry.
5515 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5516 errors on bit-fields and reverse SSO here and not...
5517 (c_mark_addressable): ...here.
5518 (output_init_element): Adjust call to initializer_constant_valid_p.
5519 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5520
8a645150
DM
55212015-11-06 David Malcolm <dmalcolm@redhat.com>
5522
5523 * c-decl.c (warn_defaults_to): Update for change in signature
5524 of diagnostic_set_info.
5525 * c-errors.c (pedwarn_c99): Likewise.
5526 (pedwarn_c90): Likewise.
5527 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5528 for textinfo::set_location.
5529
7a5e4956
CP
55302015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5531 Thomas Schwinge <thomas@codesourcery.com>
5532 James Norris <jnorris@codesourcery.com>
5533
5534 * c-parser.c (c_parser_omp_clause_name): Add support for
5535 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5536 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5537 default(none) in OpenACC.
5538 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5539 arguments.
5540 (c_parser_oacc_clause_tile): New function.
5541 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5542 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5543 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5544 TILE}.
5545 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5546 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5547 FIRSTPRIVATE}.
5548 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5549 (c_parser_oacc_update): Update the error message for missing clauses.
5550 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5551 and OMP_CLAUSE_INDEPENDENT.
5552
bfcfbfa0
MP
55532015-11-05 Marek Polacek <polacek@redhat.com>
5554
5555 PR c/68090
5556 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5557 deal with pre-evaluation on invalid types.
5558
e01d41e5
JJ
55592015-11-05 Jakub Jelinek <jakub@redhat.com>
5560 Ilya Verbin <ilya.verbin@intel.com>
5561
5562 * c-parser.c: Include context.h and gimple-expr.h.
5563 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5564 monotonic together with nonmonotonic.
5565 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5566 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5567 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5568 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5569 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5570 expressions on combined target teams before the target.
5571 (c_parser_omp_declare_target): If decl has "omp declare target" or
5572 "omp declare target link" attribute, and cgraph or varpool node already
5573 exists, then set corresponding flags. Call c_finish_omp_clauses
5574 in the parenthesized extended-list syntax case.
5575 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5576 declare target.
5577 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5578 on OMP_CLAUSE_REDUCTION array sections.
5579 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5580 into the constant offset, or for variable low-bound using
5581 POINTER_PLUS_EXPR. For structure element based array sections use
5582 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5583 (c_finish_omp_clauses): Drop generic_field_head, structure
5584 elements are now always mapped even as array section bases,
5585 diagnose same var in data sharing and mapping clauses. Diagnose if
5586 linear step on declare simd is neither a constant nor a uniform
5587 parameter. Look through POINTER_PLUS_EXPR for array section
5588 reductions. Diagnose the same var or function appearing multiple
5589 times on the same directive. Fix up wording for the to clause if t
5590 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5591 modifier on kinds other than dynamic or guided or nonmonotonic
5592 modifier together with ordered clause.
5593
4bf9e5a8
TS
55942015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5595 Chung-Lin Tang <cltang@codesourcery.com>
5596
5597 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5598
2adfab87
AM
55992015-10-29 Andrew MacLeod <amacleod@redhat.com>
5600
5601 * c-array-notation.c: Reorder #include's and remove duplicates.
5602 * c-aux-info.c: Likewise.
5603 * c-convert.c: Likewise.
5604 * c-decl.c: Likewise.
5605 * c-errors.c: Likewise.
5606 * c-lang.c: Likewise.
5607 * c-objc-common.c: Likewise.
5608 * c-parser.c: Likewise.
5609 * c-typeck.c: Likewise.
5610
e922069e
JW
56112015-10-26 Jim Wilson <jim.wilson@linaro.org>
5612
5613 PR debug/66068
5614 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5615 after calling build_qualified_type.
5616
765dd391
CP
56172015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5618 Thomas Schwinge <thomas@codesourcery.com>
5619 James Norris <jnorris@codesourcery.com>
5620 Joseph Myers <joseph@codesourcery.com>
5621 Julian Brown <julian@codesourcery.com>
5622 Bernd Schmidt <bschmidt@redhat.com>
5623
5624 * c-parser.c (c_parser_oacc_shape_clause): New.
5625 (c_parser_oacc_simple_clause): New.
5626 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5627 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5628
88bae6f4
TS
56292015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5630 James Norris <jnorris@codesourcery.com>
5631 Cesar Philippidis <cesar@codesourcery.com>
5632
5633 PR c/64765
5634 PR c/64880
5635 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5636 parameters, and handle these. Adjust all users.
5637 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5638 into...
5639 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5640 all users.
5641 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5642 declare functions.
5643 (c_finish_omp_construct): Declare function.
5644 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5645 Merge functions into...
5646 (c_finish_omp_construct): ... this new function.
5647
a8fc2579
RB
56482015-10-22 Richard Biener <rguenther@suse.de>
5649
5650 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5651 before folding a MINUS_EXPR.
5652
e9122ef6
MP
56532015-10-21 Marek Polacek <polacek@redhat.com>
5654
5655 PR c/68024
5656 * c-decl.c (start_function): Warn about vararg functions without
5657 a prototype.
5658
9f47c7e5
IE
56592015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5660
5661 * c-typeck.c (build_conditional_expr): Use boolean vector
5662 type for vector comparison.
5663 (build_vec_cmp): New.
5664 (build_binary_op): Use build_vec_cmp for comparison.
5665
fa60eeb9
MP
56662015-10-20 Marek Polacek <polacek@redhat.com>
5667
5668 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5669
2c7020eb
MP
56702015-10-20 Marek Polacek <polacek@redhat.com>
5671
5672 PR c/67964
5673 * c-parser.c (c_parser_attributes): Break out of the loop if the
5674 token after an attribute isn't a comma.
5675
d9a6bd32
JJ
56762015-10-13 Jakub Jelinek <jakub@redhat.com>
5677 Aldy Hernandez <aldyh@redhat.com>
5678
5679 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5680 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5681 (c_parser_omp_variable_list): Handle structure elements for
5682 map, to and from clauses. Handle array sections in reduction
5683 clause. Formatting fixes.
5684 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5685 if clause modifiers.
5686 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5687 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5688 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5689 c_parser_omp_clause_is_device_ptr): New functions.
5690 (c_parser_omp_clause_ordered): Parse optional parameter.
5691 (c_parser_omp_clause_reduction): Handle array reductions.
5692 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5693 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5694 functions.
5695 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5696 (c_parser_omp_clause_depend_sink): New function.
5697 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5698 (c_parser_omp_clause_map): Parse release/delete map kinds and
5699 optional always modifier.
5700 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5701 and c_finish_omp_clauses callers.
5702 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5703 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5704 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5705 (OMP_CRITICAL_CLAUSE_MASK): Define.
5706 (c_parser_omp_critical): Parse critical clauses.
5707 (c_parser_omp_for_loop): Handle doacross loops, adjust
5708 c_finish_omp_for and c_finish_omp_clauses callers.
5709 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5710 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5711 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5712 (c_parser_omp_for): Disallow ordered clause when combined with
5713 distribute. Disallow linear clause when combined with distribute
5714 and not combined with simd.
5715 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5716 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5717 parse clauses and if depend clause is found, don't parse a body.
5718 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5719 Allow target parallel without for after it.
5720 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5721 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5722 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5723 invalid kinds.
5724 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5725 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5726 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5727 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5728 functions.
5729 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5730 defaultmap and is_device_ptr clauses.
5731 (c_parser_omp_target): Parse target parallel and target simd. Set
5732 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5733 and target exit data. Diagnose invalid map kinds.
5734 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5735 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5736 construct.
5737 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5738 &omp_priv.
5739 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5740 (c_parser_omp_taskloop): New function.
5741 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5742 handle PRAGMA_OMP_TASKLOOP.
5743 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5744 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5745 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5746 Add IS_OMP argument, handle structure element bases, diagnose
5747 bitfields, pass IS_OMP recursively, diagnose known zero length
5748 array sections in depend clauses, handle array sections in reduction
5749 clause, diagnose negative length even for pointers.
5750 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5751 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5752 array sections in reduction clause, set
5753 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5754 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5755 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5756 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5757
21ba0cea
MP
57582015-10-06 Marek Polacek <polacek@redhat.com>
5759
5760 * c-parser.c (c_parser_statement_after_labels): Use
5761 protected_set_expr_location.
5762 (c_parser_omp_clause_num_gangs): Likewise.
5763 (c_parser_omp_clause_num_threads): Likewise.
5764 (c_parser_omp_clause_num_workers): Likewise.
5765 (c_parser_omp_clause_vector_length): Likewise.
5766 (c_parser_omp_clause_num_teams): Likewise.
5767 (c_parser_omp_clause_thread_limit): Likewise.
5768 * c-typeck.c (build_c_cast): Likewise.
5769 (c_cast_expr): Likewise.
5770
624d31fe
RS
57712015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5772
5773 * c-typeck.c (c_tree_equal): Use real_equal instead of
5774 REAL_VALUES_EQUAL.
5775
b8fd7909
JM
57762015-10-04 Jason Merrill <jason@redhat.com>
5777
5778 * c-parser.c (c_lex_one_token): Handle @synchronized.
5779 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5780 can change whether the function is transaction_safe.
5781
1c7485af
MP
57822015-10-02 Marek Polacek <polacek@redhat.com>
5783
5784 PR c/67730
5785 * c-typeck.c (convert_for_assignment): Use the expansion point
5786 location throughout.
5787
3e3b8d63
MP
57882015-10-02 Marek Polacek <polacek@redhat.com>
5789
5790 PR c/64249
5791 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5792 and pass it down to c_parser_if_statement.
5793 (c_parser_else_body): Add CHAIN parameter and pass it down to
5794 c_parser_statement_after_labels.
5795 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5796 duplicated if-else-if conditions.
5797
aabef2de
MP
57982015-10-01 Marek Polacek <polacek@redhat.com>
5799
5800 * c-typeck.c (convert_for_assignment): Improve commentary.
5801
de8ddd5f
MP
58022015-09-30 Marek Polacek <polacek@redhat.com>
5803
5804 PR c/67730
5805 * c-typeck.c (c_finish_return): Use the expansion point location for
5806 certain "return with value" warnings.
5807
c4914de6
MLI
58082015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5809
5810 * c-parser.c (pragma_lex): Add loc argument.
5811
0e36f5c7
MP
58122015-09-15 Marek Polacek <polacek@redhat.com>
5813
5814 PR c/67580
5815 * c-decl.c (tag_exists_p): New function.
5816 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5817 struct/union/enum keywords are missing.
5818 * c-tree.h (tag_exists_p): Declare.
5819
2f3bb934
MP
58202015-09-15 Marek Polacek <polacek@redhat.com>
5821
5822 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5823 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5824 Return NULL_TREE instead of 0.
5825 (lookup_name): Return NULL_TREE instead of 0.
5826 (lookup_name_in_scope): Likewise.
5827 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5828 (parser_xref_tag): Use false instead of 0.
5829 (start_struct): Use true instead of 1.
5830 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5831
aa256c4a
MP
58322015-09-14 Marek Polacek <polacek@redhat.com>
5833
5834 * c-typeck.c (set_nonincremental_init_from_string): Use
5835 HOST_WIDE_INT_M1U when shifting a negative value.
5836
dbb68221
MW
58372015-09-09 Mark Wielaard <mjw@redhat.com>
5838
5839 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5840 parm against NULL.
5841
a8a098ac
JJ
58422015-09-10 Jakub Jelinek <jakub@redhat.com>
5843
5844 PR c/67502
5845 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5846 into OMP_FOR_PRE_BODY rather than before the loop.
5847
f4b189d5
JJ
58482015-09-09 Jakub Jelinek <jakub@redhat.com>
5849
0bb99c11
JJ
5850 PR c/67501
5851 * c-parser.c (c_parser_oacc_all_clauses,
5852 c_parser_omp_all_clauses): Remove invalid clause from
5853 list of clauses even if parser->error is set.
5854
fce5e5e3
JJ
5855 PR c/67500
5856 * c-parser.c (c_parser_omp_clause_aligned,
5857 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5858 test for errors.
5859 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5860 error_mark_node.
5861
f4b189d5
JJ
5862 PR c/67495
5863 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5864 instead of c_parser_unary_expression. If the result is !lvalue_p,
5865 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5866
b2aaf235
MP
58672015-09-04 Marek Polacek <polacek@redhat.com>
5868
5869 PR sanitizer/67279
5870 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5871
1807ffc1
MS
58722015-09-03 Martin Sebor <msebor@redhat.com>
5873
5874 PR c/66516
8b652e65
JJ
5875 * c-typeck.c (convert_arguments, parser_build_unary_op,
5876 build_conditional_expr, c_cast_expr, convert_for_assignment,
5877 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5878 reject_gcc_builtin.
5879 (c_decl_implicit): Define.
5880
d04ff417
MP
58812015-09-02 Marek Polacek <polacek@redhat.com>
5882
5883 PR c/67432
5884 * c-parser.c (c_parser_enum_specifier): Give a better error for
5885 an empty enum.
5886
a79683d5
TS
58872015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5888
5889 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5890
191a6b94
MP
58912015-08-12 Marek Polacek <polacek@redhat.com>
5892
5893 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5894 LOC to it.
5895
420a9d9b
MP
58962015-08-03 Marek Polacek <polacek@redhat.com>
5897
5898 PR c/67088
5899 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5900 Use it.
5901 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5902
992118a1
PP
59032015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5904
5905 * c-parser.c (c_parser_if_body): Take token_indent_info
5906 argument. Call warn_for_misleading_indentation even when the
5907 body is a semicolon. Extract token_indent_infos corresponding
5908 to the guard, body and next tokens. Adjust call to
5909 warn_for_misleading_indentation accordingly.
5910 (c_parser_else_body): Likewise.
5911 (c_parser_if_statement): Likewise.
5912 (c_parser_while_statement): Likewise.
5913 (c_parser_for_statement): Likewise.
5914
46308474
LFSM
59152015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5916 Manuel López-Ibáñez <manu@gcc.gnu.org>
5917
5918 * c-decl.c (get_parm_info): Remove static var. Update warning
5919 message.
5920
05b28fd6
MP
59212015-07-27 Marek Polacek <polacek@redhat.com>
5922
5923 PR c++/66555
5924 PR c/54979
5925 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5926
451b5e48
MP
59272015-07-20 Marek Polacek <polacek@redhat.com>
5928
5929 PR c++/55095
5930 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5931 (build_binary_op): Warn about left shift overflows.
5932
1916bcb5
AM
59332015-07-09 Andrew MacLeod <amacleod@redhat.com>
5934
5935 * c-array-notation.c: Adjust includes for flags.h changes.
5936 * c-objc-common.c: Likewise.
5937
c7131fb2
AM
59382015-07-07 Andrew MacLeod <amacleod@redhat.com>
5939
5940 * c-array-notation.c: Adjust includes.
5941 * c-aux-info.c: Likewise.
5942 * c-convert.c: Likewise.
5943 * c-decl.c: Likewise.
5944 * c-errors.c: Likewise.
5945 * c-lang.c: Likewise.
5946 * c-objc-common.c: Likewise.
5947 * c-parser.c: Likewise.
5948 * c-typeck.c: Likewise.
5949
da2e71c9
MLI
59502015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5951
5952 PR fortran/66605
5953 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5954
b155cfd9
MP
59552015-06-29 Marek Polacek <polacek@redhat.com>
5956
5957 PR c/66322
5958 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5959 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5960 about -Wswitch-bool here.
5961 (do_case): Update c_add_case_label call.
5962 (c_finish_case): Update c_do_switch_warnings call.
5963
31521951
MP
59642015-06-27 Marek Polacek <polacek@redhat.com>
5965
5966 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5967
22d03525
MP
59682015-06-26 Marek Polacek <polacek@redhat.com>
5969
5970 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5971 INDIRECT_REF_P.
5972 * c-typeck.c (array_to_pointer_conversion): Likewise.
5973 (build_unary_op): Likewise.
5974 (c_finish_return): Likewise.
5975
f0889939
AM
59762015-06-25 Andrew MacLeod <amacleod@redhat.com>
5977
5978 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5979 * c-parser.c: Likewise.
5980
8d67ee55
RS
59812015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5982
5983 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5984 instead of pointer_hash.
5985 (detect_field_duplicates): Likewise.
5986
0ae9bd27
MP
59872015-06-25 Marek Polacek <polacek@redhat.com>
5988
5989 * c-array-notation.c: Use VAR_P throughout.
5990 * c-decl.c: Likewise.
5991 * c-objc-common.c: Likewise.
5992 * c-parser.c: Likewise.
5993 * c-typeck.c: Likewise.
5994
62f9079a
MP
59952015-06-25 Marek Polacek <polacek@redhat.com>
5996
5997 * c-decl.c: Use is_global_var throughout.
5998 * c-parser.c: Likewise.
5999 * c-typeck.c: Likewise.
6000
abb226c9
AM
60012015-06-17 Andrew MacLeod <amacleod@redhat.com>
6002
6003 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6004 * c-aux-info.c: Likewise.
6005 * c-convert.c: Likewise.
6006 * c-decl.c: Likewise.
6007 * c-errors.c: Likewise.
6008 * c-lang.c: Likewise.
6009 * c-objc-common.c: Likewise.
6010 * c-parser.c: Likewise.
6011 * c-typeck.c: Likewise.
6012
8cbababc
JH
60132015-06-11 Jan Hubicka <hubicka@ucw.cz>
6014
6015 PR middle-end/66325
6016 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6017 variants.
6018
a0349665
PMR
60192015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6020
6021 * c-decl.c (pop_scope): Register the main translation unit
6022 through the new debug hook.
6023
13fdf2e2
AM
60242015-06-08 Andrew MacLeod <amacleod@redhat.com>
6025
6026 * c-array-notation.c : Adjust include files.
6027 * c-aux-info.c : Likewise.
6028 * c-convert.c : Likewise.
6029 * c-decl.c : Likewise.
6030 * c-errors.c : Likewise.
6031 * c-lang.c : Likewise.
6032 * c-lang.h : Likewise.
6033 * c-objc-common.c : Likewise.
6034 * c-parser.c : Likewise.
6035 * c-typeck.c : Likewise.
6036
d7438551
AH
60372015-06-05 Aldy Hernandez <aldyh@redhat.com>
6038
6039 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6040 immediately clobber it.
6041 (c_write_global_declarations_1): Remove call to
6042 check_global_declaration_1.
6043 (c_write_global_declarations_2): Remove.
6044 (c_write_final_cleanups): Rename from c_write_global_declarations.
6045 Remove call to finalize_compilation_unit.
6046 Remove calls to debugging hooks.
6047 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6048 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6049 * c-tree.h: Remove c_write_global_declarations.
6050
ecb9f223
AM
60512015-06-04 Andrew MacLeod <amacleod@redhat.com>
6052
6053 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6054 * c-aux-info.c: Likewise.
6055 * c-convert.c: Likewise.
6056 * c-decl.c: Likewise.
6057 * c-errors.c: Likewise.
6058 * c-lang.c: Likewise.
6059 * c-objc-common.c: Likewise.
6060 * c-parser.c: Likewise.
6061 * c-typeck.c: Likewise.
6062
9482b620
MP
60632015-06-04 Marek Polacek <polacek@redhat.com>
6064
6065 PR c/66341
6066 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6067 it is a lvalue.
6068
bc51ace3
PK
60692015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6070
6071 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6072 Warn for empty struct.
6073 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6074
ea5b45b6
AT
60752015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6076
6077 * c-decl.c (start_function): Call plugin before parsing.
6078 (finish_function): Call plugin after parsing.
6079
c2d47482
PK
60802015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6081
6082 PR c/49551
6083 * c-decl.c (merge_decls): Merge DECL_COMMON.
6084
a95492ab
JW
60852015-05-22 Jim Wilson <jim.wilson@linaro.org>
6086
6087 * Make-lang.in (check_gcc_pallelize): Define.
6088
fd5c817a
MP
60892015-05-22 Marek Polacek <polacek@redhat.com>
6090
6091 PR c/47043
6092 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6093 attributes.
6094
c7b70a3c
MP
60952015-05-21 Marek Polacek <polacek@redhat.com>
6096
6097 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6098 DECL_BUILT_IN.
6099
21b634ae
MP
61002015-05-20 Marek Polacek <polacek@redhat.com>
6101
6102 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6103 * c-typeck.c: Likewise.
6104
296a8c2f
MP
61052015-05-19 Marek Polacek <polacek@redhat.com>
6106
6107 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6108
41b37d5e
JJ
61092015-05-19 Jakub Jelinek <jakub@redhat.com>
6110
6111 PR middle-end/66199
6112 * c-parser.c (c_parser_omp_for_loop): Don't add
6113 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6114 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6115 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6116 constructs.
6117
fab27f52
MM
61182015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6119
6120 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6121 swaps.
fab27f52 6122
40de31cf
MLI
61232015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6124
6125 PR fortran/44054
6126 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6127 accessor function.
6128
3aa3c9fc
MP
61292015-05-14 Marek Polacek <polacek@redhat.com>
6130
6131 PR c/66066
6132 PR c/66127
6133 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6134 rather than with 0.
6135
c3388e62
DM
61362015-05-12 David Malcolm <dmalcolm@redhat.com>
6137
6138 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6139 to add a call to warn_for_misleading_indentation.
6140 (c_parser_else_body): Likewise, adding param "else_loc".
6141 (c_parser_if_statement): Check for misleading indentation.
6142 (c_parser_while_statement): Likewise.
6143 (c_parser_for_statement): Likewise.
6144
755e528f
MP
61452015-05-08 Marek Polacek <polacek@redhat.com>
6146
6147 PR c/64918
6148 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6149 (output_init_element): Likewise.
6150
0173bd2a
MP
61512015-05-07 Marek Polacek <polacek@redhat.com>
6152
6153 PR c/65179
6154 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6155 value.
6156
9babc352
MP
61572015-04-30 Marek Polacek <polacek@redhat.com>
6158
6159 * c-typeck.c (set_init_label): Call error_at instead of error and
6160 pass LOC to it.
6161
ac9f18db
MP
6162 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6163 the type of a decl.
6164
ec3fba51
MP
6165 * c-typeck.c (c_build_va_arg): Clarify the error message.
6166
b811915d
TS
61672015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6168
6169 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6170 OMP_STANDALONE_CLAUSES.
6171
f3075008
MP
61722015-04-28 Marek Polacek <polacek@redhat.com>
6173
6174 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6175
4e81b788
MP
61762015-04-28 Marek Polacek <polacek@redhat.com>
6177
6178 PR c/65901
6179 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6180
6c1db78e
MP
61812015-04-25 Marek Polacek <polacek@redhat.com>
6182
6183 PR c/52085
6184 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6185 attribute.
6186
5c4abbb8
MP
61872015-04-23 Marek Polacek <polacek@redhat.com>
6188
6189 PR c/65345
6190 * c-decl.c (set_labels_context_r): New function.
6191 (store_parm_decls): Call it via walk_tree_without_duplicates.
6192 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6193 instead of create_tmp_var. Build TARGET_EXPR instead of
6194 COMPOUND_EXPR.
6195 (build_atomic_assign): Use create_tmp_var_raw instead of
6196 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6197
06aca1d5
IV
61982015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6199
6200 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6201 (c_parser_omp_target_update): Add missed %> to error_at ().
6202
8fba1830
BRF
62032015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6204
6205 PR target/55143
6206 * c-decl.c (c_default_pointer_mode): Remove definition.
6207 * c-tree.h (c_default_pointer_mode): Remove declaration.
6208
62021f64
TB
62092015-03-27 Tobias Burnus <burnus@net-b.de>
6210
6211 PR c/65586
6212 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6213 error out.
6214 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6215 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6216 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6217
9b65e171
JJ
62182015-03-19 Jakub Jelinek <jakub@redhat.com>
6219
6220 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6221 attribute for DECL_EXTERNAL VAR_DECLs.
6222
17958621
JJ
62232015-03-11 Jakub Jelinek <jakub@redhat.com>
6224
6225 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6226 argument.
6227
7ccb1a11
JJ
62282015-03-10 Jakub Jelinek <jakub@redhat.com>
6229
6230 PR c/65120
6231 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6232 before preparing arguments to warn_logical_not_parentheses.
6233
01177669
JJ
62342015-03-09 Jakub Jelinek <jakub@redhat.com>
6235
6236 PR c/65120
6237 * c-typeck.c (parser_build_binary_op): Don't warn for
6238 !!x == y or !b == y where b is _Bool.
6239
802ac282
MP
62402015-03-09 Marek Polacek <polacek@redhat.com>
6241
6242 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6243 * c-decl.c (grokdeclarator): Likewise.
6244 * c-typeck.c (build_binary_op): Likewise.
6245
e5165b60
MP
62462015-02-27 Marek Polacek <polacek@redhat.com>
6247
6248 PR c/65228
6249 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6250
065d214c
MP
62512015-02-14 Marek Polacek <polacek@redhat.com>
6252
6253 PR c/64768
6254 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6255 declared through a typedef name.
6256
e5d9235b
MP
62572015-02-13 Marek Polacek <polacek@redhat.com>
6258
6259 PR c/65050
6260 * c-decl.c (grokdeclarator): Print also the type when giving
6261 the error message about array's incomplete element type.
6262
fa01ffcc
JJ
62632015-02-11 Jakub Jelinek <jakub@redhat.com>
6264
6265 PR c/64824
6266 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6267 check in the POP macro.
6268
c3e38a03
MP
62692015-02-09 Marek Polacek <polacek@redhat.com>
6270
6271 PR c/64856
6272 * c-typeck.c (process_init_element): Don't always wrap
6273 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6274 initializing a range of elements.
6275
4886ec8e
JJ
62762015-02-04 Jakub Jelinek <jakub@redhat.com>
6277
6278 PR c/64824
6279 PR c/64868
6280 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6281
c3e38a03 62822015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6283
6284 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6285 processing enum declaration.
6286
7b33f0c8
MP
62872015-01-29 Marek Polacek <polacek@redhat.com>
6288
6289 PR c/64709
6290 * c-typeck.c (pop_init_level): If constructor_elements has
6291 exactly one element with integer_zerop value, set constructor_zeroinit
6292 to 1. Remove braces around warning_init call.
6293
dea63e49
JJ
62942015-01-27 Jakub Jelinek <jakub@redhat.com>
6295
6296 PR c/64766
6297 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6298 of FUNCTION_DECLs with error_mark_node.
6299
d38f7dce
JJ
63002015-01-26 Jakub Jelinek <jakub@redhat.com>
6301
6302 PR c/64778
6303 * c-typeck.c (convert_arguments): Return -1 if there are
6304 error_args, even if we've diagnosed too many arguments.
6305
cbf5d0e7
RB
63062015-01-21 Richard Biener <rguenther@suse.de>
6307
6308 PR middle-end/64313
6309 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6310 for builtins the user declared correctly.
6311
41dbbb37
TS
63122015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6313 Bernd Schmidt <bernds@codesourcery.com>
6314 Cesar Philippidis <cesar@codesourcery.com>
6315 James Norris <jnorris@codesourcery.com>
6316 Jakub Jelinek <jakub@redhat.com>
6317 Ilmir Usmanov <i.usmanov@samsung.com>
6318
6319 * c-parser.c: Include "gomp-constants.h".
6320 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6321 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6322 Use OMP_CLAUSE_SET_MAP_KIND.
6323 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6324 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6325 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6326 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6327 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6328 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6329 "copyout", "create", "delete", "deviceptr", "gang", "host",
6330 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6331 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6332 "present_or_create", "pcreate", "seq", "self", "vector",
6333 "vector_length", "wait", "worker".
6334 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6335 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6336 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6337 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6338 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6339 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6340 (c_parser_oacc_data_clause_deviceptr)
6341 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6342 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6343 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6344 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6345 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6346 (c_parser_oacc_parallel, c_parser_oacc_update)
6347 (c_parser_oacc_wait): New functions.
6348 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6349 (c_finish_oacc_data): New prototypes.
6350 * c-typeck.c: Include "gomp-constants.h".
6351 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6352 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6353 OMP_CLAUSE_SET_MAP_KIND.
6354 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6355 (c_finish_oacc_data): New functions.
6356 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6357 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6358 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6359 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6360 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6361 GOMP_MAP_FORCE_DEVICEPTR.
6362
adfac8df
JJ
63632015-01-09 Michael Collison <michael.collison@linaro.org>
6364
6365 * c-array-notation.c: Include hash-set.h, machmode.h,
6366 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6367 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6368 * c-aux-info.c: Ditto.
6369 * c-convert.c: Ditto.
6370 * c-decl.c: Ditto.
6371 * c-errors.c: Ditto.
6372 * c-lang.c: Dittoxs.
6373 * c-objc-common.c: Ditto.
6374 * c-parser.c: Ditto.
6375 * c-typeck.c: Include hash-set.h, machmode.h,
6376 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6377 fold-const.h, wide-int.h, inchash.h, real.h and
6378 fixed-value.h due to flattening of tree.h.
6379
2cc901dc
MP
63802015-01-07 Marek Polacek <polacek@redhat.com>
6381
6382 PR c/64417
6383 * c-typeck.c (process_init_element): Disallow initialization of
6384 a flexible array member with a string constant if the structure
6385 is in an array.
6386
5624e564
JJ
63872015-01-05 Jakub Jelinek <jakub@redhat.com>
6388
e5341100
JJ
6389 PR sanitizer/64344
6390 * c-typeck.c (convert_for_assignment, c_finish_return): For
6391 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6392 types also set in_late_binary_op around convert call.
6393 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6394 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6395 result on expr as last argument to ubsan_instrument_float_cast,
6396 if in_late_binary_op, don't use c_save_expr but save_expr.
6397
5624e564
JJ
6398 Update copyright years.
6399
5bd012f8
MP
64002015-01-05 Marek Polacek <polacek@redhat.com>
6401
6402 PR c/64423
6403 * c-typeck.c (build_array_ref): Pass loc down to
6404 warn_array_subscript_with_type_char.
6405
3f8257db 64062014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6407
6408 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6409 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6410 element type.
8e745a17 6411 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6412 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6413 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6414 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6415 to PEDWARN_FOR_QUALIFIERS.
768952be 6416
8f94a8c4
JJ
64172014-12-17 Jakub Jelinek <jakub@redhat.com>
6418
6419 PR sanitizer/64289
6420 * c-convert.c: Include ubsan.h.
6421 (convert): For real -> integral casts and
6422 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6423 instead instrument the float cast directly.
6424
b731b390
JJ
64252014-11-29 Jakub Jelinek <jakub@redhat.com>
6426
6427 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6428 c_finish_stmt_expr): Remove NULL last argument from
6429 create_tmp_var_raw and create_tmp_var calls.
6430 * c-array-notation.c (fix_builtin_array_notation_fn,
6431 build_array_notation_expr, fix_conditional_array_notations_1,
6432 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6433
541e35a6
MP
64342014-11-28 Marek Polacek <polacek@redhat.com>
6435
6436 PR c/63862
6437 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6438 convert the right operand to integer type.
6439
b286be94
MP
64402014-11-25 Marek Polacek <polacek@redhat.com>
6441
6442 PR c/63877
6443 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6444 for inline functions.
6445
aa7da51a
JJ
64462014-11-21 Jakub Jelinek <jakub@redhat.com>
6447
6448 PR target/63764
6449 * c-typeck.c (build_array_ref): Adjust
6450 convert_vector_to_pointer_for_subscript caller. If it returns true,
6451 call non_lvalue_loc on the result.
6452
d876207f
RB
64532014-11-11 Richard Biener <rguenther@suse.de>
6454
6455 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6456 to true.
6457
e5e44252
AK
64582014-11-10 Andi Kleen <ak@linux.intel.com>
6459
6460 PR c/60804
6461 * c-parser.c (c_parser_statement_after_labels): Call
6462 check_no_cilk.
6463 (c_parser_if_statement): Dito.
6464 (c_parser_switch_statement): Dito.
6465 (c_parser_while_statement): Dito.
6466 (c_parser_do_statement): Dito.
6467 (c_parser_for_statement): Dito.
6468 * c-typeck.c (c_finish_loop): Dito.
6469
13c21655
PC
64702014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6471
6472 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6473 OPT_Wshift_count_overflow in the warnings.
6474
2d51fcef
MP
64752014-10-30 Marek Polacek <polacek@redhat.com>
6476
6477 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6478 print the stripped version as well, if they're not the same.
6479
ef4bddc2
RS
64802014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6481
6482 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6483 machine_mode.
6484
c582198b
AM
64852014-10-28 Andrew MacLeod <amacleod@redhat.com>
6486
6487 * c-decl.c: Adjust include files.
6488 * c-parser.c: Ditto.
6489
ddc8de03
PM
64902014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6491 Tom Tromey <tromey@redhat.com>
6492
6493 * c-tree.h (enum c_oracle_request): New.
6494 (c_binding_oracle_function): New typedef.
6495 (c_binding_oracle, c_pushtag, c_bind): Declare.
6496 * c-decl.c (c_binding_oracle): New global.
6497 (I_SYMBOL_CHECKED): New macro.
6498 (i_symbol_binding): New function.
6499 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6500 (I_TAG_CHECKED): New macro.
6501 (i_tag_binding): New function.
6502 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6503 (I_LABEL_CHECKED): New macro.
6504 (i_label_binding): New function.
6505 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6506 (c_print_identifier): Save and restore c_binding_oracle.
6507 (c_pushtag, c_bind): New functions.
6508
60393bbc
AM
65092014-10-27 Andrew MacLeod <amacleod@redhat.com>
6510
6511 * c-typeck.c: Adjust include files.
6512
d723bb7c
MLI
65132014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6514
6515 PR c++/53061
6516 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6517 initialization here...
6518 (c_initialize_diagnostics): ... but here. Set defaults after
6519 building pretty-printer.
6520
1bc5a451
MP
65212014-10-23 Marek Polacek <polacek@redhat.com>
6522
6523 PR c/63626
6524 * c-decl.c (pop_scope): Don't print warning in external_scope.
6525
4435bb92
MP
65262014-10-19 Marek Polacek <polacek@redhat.com>
6527
6528 PR c/63567
6529 * c-typeck.c (output_init_element): Allow initializing objects with
6530 static storage duration with compound literals even in C99 and add
6531 pedwarn for it.
6532
7278465e
MP
65332014-10-17 Marek Polacek <polacek@redhat.com>
6534
6535 PR c/63567
6536 * c-typeck.c (digest_init): Allow initializing objects with static
6537 storage duration with compound literals even in C99 and add pedwarn
6538 for it.
6539
d9b7be2e
MP
65402014-10-17 Marek Polacek <polacek@redhat.com>
6541
6542 PR c/63543
6543 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6544 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6545 error multiple times. Print the type.
6546
f406ae1f
MP
65472014-10-17 Marek Polacek <polacek@redhat.com>
6548
6549 PR c/63549
6550 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6551 type.
6552
92574c7c
MP
65532014-10-17 Marek Polacek <polacek@redhat.com>
6554
6555 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6556 (start_function): Use OPT_Wimplicit_int instead of 0.
6557 (store_parm_decls_oldstyle): Likewise.
6558
1bc4a978
MT
65592014-10-17 Alan Modra <amodra@gmail.com>
6560
6561 PR middle-end/61848
6562 * c-decl.c (merge_decls): Don't merge section name or tls model
6563 to newdecl symtab node, instead merge to olddecl. Override
6564 existing olddecl section name. Set tls_model for all thread-local
6565 vars, not just OMP thread-private ones. Remove incorrect comment.
6566
83685514
AM
65672014-10-16 Andrew MacLeod <amacleod@redhat.com>
6568
6569 * c-decl.c: Adjust include files.
6570
78a7c317
DD
65712014-10-14 DJ Delorie <dj@redhat.com>
6572
6573 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6574 (c_token_starts_typename): Check all __intN, not just __int128.
6575 (c_token_starts_declspecs): Likewise.
6576 (c_parser_declspecs): Likewise.
6577 (c_parser_attribute_any_word): Likewise.
6578 (c_parser_objc_selector): Likewise.
6579 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6580 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6581 is specified.
6582 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6583 __int128.
6584 (finish_declspecs): Likewise.
6585
74d98c1e
AB
65862014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6587
8e745a17 6588 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6589 the duplicate code.
8e745a17 6590 (c_parser_statement): Call the new function.
74d98c1e 6591
84937de2
MP
65922014-10-09 Marek Polacek <polacek@redhat.com>
6593
6594 PR c/63480
6595 * c-typeck.c (pop_init_level): Don't warn about initializing
6596 with { }.
6597
0382aaa0
MP
65982014-10-07 Marek Polacek <polacek@redhat.com>
6599
6600 PR c/59717
6601 * c-decl.c (header_for_builtin_fn): New function.
6602 (implicitly_declare): Suggest which header to include.
6603
7a0ca710
MP
66042014-10-07 Marek Polacek <polacek@redhat.com>
6605
6606 * c-convert.c (convert): Use error_operand_p.
6607 * c-typeck.c (require_complete_type): Likewise.
6608 (really_atomic_lvalue): Likewise.
6609 (digest_init): Likewise.
6610 (handle_omp_array_sections_1): Likewise.
6611
6bc8a126
MP
66122014-10-03 Marek Polacek <polacek@redhat.com>
6613
6614 PR c/63453
6615 * c-decl.c (pop_scope): Don't warn about "inline function declared
6616 but never defined" for functions marked with gnu_inline attribute.
6617
d90c0a59
JJ
66182014-09-25 Jakub Jelinek <jakub@redhat.com>
6619
6620 PR c++/63249
6621 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6622 on low_bound and length.
6623
083e891e
MP
66242014-09-24 Marek Polacek <polacek@redhat.com>
6625
6626 PR c/61405
6627 PR c/53874
6628 * c-parser.c: Don't define CPP_KEYWORD.
6629 (c_parser_switch_statement): Pass original type to c_finish_case.
6630 * c-tree.h (c_finish_case): Update declaration.
6631 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6632 conditionally to c_do_switch_warnings.
6633
8d95fe25
MP
66342014-09-03 Marek Polacek <polacek@redhat.com>
6635
6636 PR c/62024
6637 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6638 conversions.
6639
9a771876
JJ
66402014-09-02 Jakub Jelinek <jakub@redhat.com>
6641 Balaji V. Iyer <balaji.v.iyer@intel.com>
6642 Igor Zamyatin <igor.zamyatin@intel.com>
6643
6644 * c-parser.c (c_parser_cilk_for): New function.
6645 (c_parser_cilk_grainsize): Likewise.
6646 (c_get_temp_regvar): Likewise.
6647 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6648 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6649 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6650 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6651 case.
6652
b7679d96
CG
66532014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6654
6655 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6656 with using HOST_WIDE_INT without truncation to 'int'
6657
59ea0364
MP
66582014-08-22 Marek Polacek <polacek@redhat.com>
6659
6660 PR c++/62199
6661 * c-typeck.c (parser_build_binary_op): Adjust call to
6662 warn_logical_not_parentheses.
6663
671a475e
IZ
66642014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6665
6666 PR other/62008
6667 * c-parser.c (c_parser_array_notation): Check for correct
6668 type of an array added.
6669
04159acf
MP
66702014-08-19 Marek Polacek <polacek@redhat.com>
6671
6672 PR c++/62153
6673 * c-typeck.c (build_binary_op): If either operand of a comparison
6674 is a boolean expression, call maybe_warn_bool_compare.
6675
c77935ee
PP
66762014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6677
6678 PR c/45584
6679 * c-typeck.c (build_c_cast): Do a conversion even when the
6680 TYPE_MAIN_VARIANTs are the same.
6681
35aff4fb
MP
66822014-08-19 Marek Polacek <polacek@redhat.com>
6683
6684 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6685 pedwarn_c99 instead of pedwarn.
6686 (grokfield): Likewise.
6687 (warn_defaults_to): New function.
6688 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6689 Unconditionally call pedwarn_c99 instead of pedwarn.
6690 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6691 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6692 check flag_isoc11 before.
6693 * c-errors.c (pedwarn_c99): Change the return type to bool.
6694 Handle -Wc99-c11-compat.
6695 * c-parser.c (disable_extension_diagnostics): Handle
6696 warn_c99_c11_compat.
6697 (restore_extension_diagnostics): Likewise.
6698 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6699 instead of pedwarn, don't check flag_isoc11 before.
6700 (c_parser_declspecs): Likewise.
6701 (c_parser_alignas_specifier): Likewise.
6702 (c_parser_alignof_expression): Likewise.
6703 (c_parser_generic_selection): Likewise.
6704 * c-tree.h (pedwarn_c99): Update declaration.
6705 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6706 of pedwarn_c99.
6707
177cce46
MP
67082014-08-19 Marek Polacek <polacek@redhat.com>
6709
6710 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6711 to pedwarn_c90.
6712 * c-errors.c: Include "opts.h".
6713 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6714 * c-parser.c (disable_extension_diagnostics): Handle negative value
6715 of warn_c90_c99_compat, too.
6716 (restore_extension_diagnostics): Likewise.
6717 (c_parser_compound_statement_nostart): Pass
6718 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6719
6dc99c33
MP
67202014-08-12 Marek Polacek <polacek@redhat.com>
6721
6722 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6723 Add pedwarn.
6724 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6725 Likewise.
6726 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6727
3f8257db 67282014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6729
6730 PR c/51849
6731 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6732 Call pedwarn_c90 instead of pedwarn.
6733 (check_bitfield_type_and_width): Likewise.
6734 (declspecs_add_qual): Likewise.
6735 (declspecs_add_type): Likewise.
6736 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6737 Adjust to only call pedwarn_c90.
6738 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6739 pedwarn_c90 instead of pedwarn.
6740 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6741 * c-parser.c (disable_extension_diagnostics): Handle
6742 warn_c90_c99_compat.
6743 (restore_extension_diagnostics): Likewise.
6744 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6745 pedwarn_c90 instead of pedwarn.
6746 (c_parser_initelt): Likewise.
6747 (c_parser_postfix_expression): Likewise.
6748 (c_parser_postfix_expression_after_paren_type): Likewise.
6749 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6750 * c-tree.h: Fix formatting.
6751 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6752 pedwarn_c90 instead of pedwarn.
6753
9f25a338
TS
67542014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6755
6756 * c-typeck.c: Remove include of pointer-set.h.
6757
044331a8
MP
67582014-08-07 Marek Polacek <polacek@redhat.com>
6759
6760 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6761
b787e7a2
TS
67622014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6763
6764 * c-typeck.c: Use hash_map instead of pointer_map.
6765
6e2830c3
TS
67662014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6767
6768 * c-decl.c: Use hash_set instead of pointer_set.
6769
a7ee52fb
IZ
67702014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6771
6772 PR middle-end/61455
6773 * c-array-notation.c (expand_array_notations): Handling
6774 of DECL_EXPR added.
6775
b4dfdc11
MG
67762014-07-31 Marc Glisse <marc.glisse@inria.fr>
6777
6778 PR c++/60517
6779 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6780 a local variable.
6781
976d5a22
TT
67822014-07-30 Tom Tromey <tromey@redhat.com>
6783
6784 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6785 field.
6786 (really_start_incremental_init, push_init_level): Initialize
6787 designator_depth.
6788 (pop_init_level): Set global designator_depth.
6789 (process_init_element): Check for designated_init attribute.
6790
30281de2
MP
67912014-07-20 Marek Polacek <polacek@redhat.com>
6792
6793 PR c/61852
6794 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6795 (implicitly_declare): Pass location to implicit_decl_warning.
6796
b108f48f
JJ
67972014-07-14 Jakub Jelinek <jakub@redhat.com>
6798
6799 PR middle-end/61294
6800 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6801 If non-NULL, call c_parser_check_literal_zero.
6802 (c_parser_check_literal_zero): New function.
6803 (c_parser_postfix_expression_after_primary): Adjust
6804 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6805
773ec47f
MP
68062014-07-06 Marek Polacek <polacek@redhat.com>
6807
6808 PR c/6940
6809 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6810 * c-tree.h (C_ARRAY_PARAMETER): Define.
6811 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6812 function parameter.
6813
22e1cf1c 68142014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6815 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6816
6817 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6818 releasing symbol.
6819
52ec0ea3
MP
68202014-07-01 Marek Polacek <polacek@redhat.com>
6821
6822 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6823 instead of 0 to WARN_FOR_ASSIGNMENT.
6824
d5c3d343
MP
68252014-07-01 Marek Polacek <polacek@redhat.com>
6826
6827 PR c/58286
6828 * c-typeck.c (convert_for_assignment): Pass
6829 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6830
6a7253a4
MP
68312014-06-30 Marek Polacek <polacek@redhat.com>
6832
6833 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6834 has no_sanitize_undefined attribute.
6835
5e88a8f4
IZ
68362014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6837
6838 PR middle-end/57541
6839 * c-array-notation.c (fix_builtin_array_notation_fn):
6840 Check for 0 arguments in builtin call. Check that bultin argument is
6841 correct.
6842 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6843 index.
6844
9698b078
SH
68452014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6846
6847 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6848 qualifiers in __auto_type for atomic types.
6849 (c_parser_typeof_specifier): Discard all type qualifiers in
6850 __typeof__ for atomic types.
6851
6e07c515
MP
68522014-06-25 Marek Polacek <polacek@redhat.com>
6853
6854 PR c/61162
6855 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6856 the return expression to c_finish_return.
6857
da6f124d
JJ
68582014-06-25 Jakub Jelinek <jakub@redhat.com>
6859
6860 * c-typeck.c (c_finish_omp_clauses): Make sure
6861 OMP_CLAUSE_LINEAR_STEP has correct type.
6862
c203e8a7
TS
68632014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6864
6865 * c-decl.c: Adjust.
6866
56ad0e38
JJ
68672014-06-24 Jakub Jelinek <jakub@redhat.com>
6868
6869 * c-parser.c (c_parser_omp_for_loop): For
6870 #pragma omp parallel for simd move lastprivate clause from parallel
6871 to for rather than simd.
6872
47c2554f
MP
68732014-06-23 Marek Polacek <polacek@redhat.com>
6874
6875 * c-typeck.c (parser_build_binary_op): Don't call
6876 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6877
56363ffd
JH
68782014-06-15 Jan Hubicka <hubicka@ucw.cz>
6879
6880 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6881 * c-decl.c (merge_decls): Likewise.
6882
d7ff7ae5
MP
68832014-06-09 Marek Polacek <polacek@redhat.com>
6884
6885 PR c/36446
6886 * c-typeck.c (error_init): Call inform instead of error_at.
6887 (pedwarn_init): Call inform instead of pedwarn.
6888 (warning_init): Call inform instead of warning_at.
6889
24d047a3
JH
68902014-06-07 Jan Hubicka <hubicka@ucw.cz>
6891
6892 * c-decl.c (merge_decls): Use set_decl_section_name.
6893 (duplicate_decls): Remove node if it exists.
6894
9bac5cbb
G
68952014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6896
6897 PR c/53119
6898 * c-typeck.c (push_init_level, process_init_element,
6899 pop_init_level): Correct check for zero initialization, move
6900 missing brace warning to respect zero initialization.
6901
8ffcdea8
MP
69022014-06-05 Marek Polacek <polacek@redhat.com>
6903
6904 PR c/56724
6905 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6906
742938c9
MP
69072014-06-05 Marek Polacek <polacek@redhat.com>
6908
6909 PR c/49706
6910 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6911 on the left hand side operand of a comparison.
742938c9 6912
6447c55d
MP
69132014-06-05 Marek Polacek <polacek@redhat.com>
6914
6915 PR c/48062
6916 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6917 Print note only if the warning was printed.
6918
9dc7743c
IZ
69192014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6920
6921 PR c/58942
6922 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6923 with a pointer.
6924
fedfecef
MP
69252014-06-03 Marek Polacek <polacek@redhat.com>
6926
6927 PR c/60439
6928 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6929 c_start_case.
6930 * c-tree.h (c_start_case): Update.
6931 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6932 switch condition has boolean value.
6933
9b2b7279
AM
69342014-06-02 Andrew MacLeod <amacleod@redhat.com>
6935
6936 * c-decl.c: Include builtins.h.
6937 * c-parser.c: Likewise.
6938
5c1bc275
MP
69392014-05-27 Marek Polacek <polacek@redhat.com>
6940
6941 PR c/56724
6942 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6943 error and warning calls to error_at and warning_at. Pass location of
6944 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6945 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6946 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6947
97563bc8
IZ
69482014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6949
6950 PR c/61191
6951 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6952 function parameters.
6953
aede2c10
JH
69542014-05-23 Jan Hubicka <hubicka@ucw.cz>
6955
6956 * c-decl.c (merge_decls): Preserve symtab node pointers.
6957 (duplicate_decls): Free new decl.
6958
edbba2ce
TS
69592014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6960
f3316c6d
TS
6961 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6962 initialization.
6963
edbba2ce
TS
6964 * c-parser.c (c_parser_omp_target): Return bool values.
6965
68c81f24
TS
69662014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6967
6968 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6969 num_teams_loc variable to num_thread_limit_loc.
6970
632f2871
RS
69712014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6972
6973 * c-array-notation.c (expand_array_notations): Use void_node
6974 instead of void_zero_node.
6975
766090c2
TS
69762014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6977
6978 * c-decl.c (finish_struct): Adjust.
6979 (finish_enum): Likewise.
6980 (bind): Adjust.
6981 (record_inline_static): Likewise.
6982 (push_scope): Likewise.
6983 (make_label): Likewise.
6984 (lookup_label_for_goto): Likewise.
6985 (finish_struct): Likewise.
6986 (finish_enum): Likewise.
6987 (store_parm_decls): Likewise.
6988 (c_push_function_context): Likewise.
6989 * c-lang.h: Remove usage of variable_size gty attribute.
6990 * c-parser.c (c_parse_init): Adjust.
6991 (c_parse_file): Likewise.
6992
2b107f6b
MP
69932014-05-13 Marek Polacek <polacek@redhat.com>
6994
6995 PR c/61162
6996 * c-typeck.c (convert_for_assignment): Pass location to
6997 WARN_FOR_ASSIGNMENT instead of input_location.
6998
d033409e
MP
69992014-05-10 Marek Polacek <polacek@redhat.com>
7000
7001 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7002 maybe_warn_string_init.
7003 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7004 maybe_warn_string_init.
7005 * c-tree.h (maybe_warn_string_init): Update declaration.
7006 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7007 Call pedwarn_init with loc instead of with input_location.
7008 (digest_init): Pass init_loc to maybe_warn_string_init.
7009 (pop_init_level): Call pedwarn_init with loc instead of with
7010 input_location.
7011 (set_init_index): Likewise.
7012 (process_init_element): Likewise.
7013
ea58ef42
MP
70142014-05-09 Marek Polacek <polacek@redhat.com>
7015
7016 PR c/61096
7017 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7018 (c_parser_initelt): Pass location to set_init_label. Pass array index
7019 location to set_init_index.
7020 * c-tree.h (push_init_level): Update declaration.
7021 (pop_init_level): Likewise.
7022 (set_init_index): Likewise.
7023 (set_init_label): Likewise.
7024 * c-typeck.c (error_init): Add location parameter. Call error_at
7025 instead of error.
7026 (digest_init): Pass init_loc to error_init.
7027 (really_start_incremental_init):
7028 (push_init_level): Add location parameter. Pass loc to pop_init_level
7029 and error_init.
7030 (pop_init_level): Likewise.
7031 (set_designator): Add location parameter. Pass loc to pop_init_level,
7032 push_init_level, and error_init.
7033 (set_init_index): Add location parameter. Pass loc to error_init and
7034 set_designator.
7035 (set_init_label): Likewise.
7036 (output_init_element): Pass loc to error_init.
7037 (process_init_element): Pass loc to error_init, pop_init_level,
7038 pedwarn_init, and push_init_level.
7039
661a0813
MP
70402014-05-09 Marek Polacek <polacek@redhat.com>
7041
7042 PR c/50459
7043 * c-parser.c (c_parser_attributes): Parse the arguments as an
7044 expression-list if the attribute takes identifier.
7045
2793eeab
MP
70462014-05-08 Marek Polacek <polacek@redhat.com>
7047
7048 PR c/61053
7049 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7050 TYPE_ALIGN_UNIT.
7051
f827930a
MP
70522014-05-08 Marek Polacek <polacek@redhat.com>
7053
7054 PR c/61077
7055 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7056 of main.
7057
1d60af08
KZ
70582014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7059 Mike Stump <mikestump@comcast.net>
7060 Richard Sandiford <rdsandiford@googlemail.com>
7061
7062 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7063 (finish_enum): Use wide-int interfaces.
7064 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7065 * c-typeck.c (build_c_cast): Likewise.
7066 (set_nonincremental_init_from_string): Likewise.
7067 (c_tree_equal): Likewise.
7068
a0e24419
MP
70692014-05-02 Marek Polacek <polacek@redhat.com>
7070
7071 PR c/25801
7072 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7073 Return size_one_node when the type is not complete.
7074 (pointer_diff): Remove comment.
7075 (build_unary_op): Improve error messages.
7076
19fc9faa
MP
70772014-05-02 Marek Polacek <polacek@redhat.com>
7078
7079 * c-typeck.c (c_finish_return): Separate warning_at calls.
7080
63bc4e87
MP
70812014-05-02 Marek Polacek <polacek@redhat.com>
7082
7083 * c-tree.h (error_init): Remove declaration.
7084 (pedwarn_init): Likewise.
7085 * c-typeck.c (error_init): Make static and move above.
7086 (pedwarn_init): Likewise.
7087 (warning_init): Move above.
7088 (maybe_warn_string_init): Likewise.
7089
4bd2511b
JL
70902014-05-01 Jeff Law <law@redhat.com>
7091
7092 Revert:
7093
7094 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7095 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7096 avoid goto.
7097
6a358dcb
MP
70982014-05-02 Marek Polacek <polacek@redhat.com>
7099
7100 PR c/60784
7101 * c-typeck.c (push_init_level): Set constructor_designated to
7102 p->designated for structures.
7103
ae5ebda4
MP
71042014-05-01 Marek Polacek <polacek@redhat.com>
7105
7106 PR c/60915
7107 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7108 function-definition has an attribute after the declarator.
7109
96b40f8d
MP
71102014-05-01 Marek Polacek <polacek@redhat.com>
7111
7112 PR c/60257
7113 * c-typeck.c (warning_init): Add location_t parameter. Call
7114 warning_at instead of warning.
7115 (push_init_level): Pass input_location to warning_init.
7116 (add_pending_init): Add location_t parameter. Pass loc to
7117 warning_init.
7118 (set_nonincremental_init): Pass input_location to add_pending_init.
7119 (set_nonincremental_init_from_string): Likewise.
7120 (output_init_element): Pass loc to warning_init and to
7121 add_pending_init.
7122
32e00768
MP
71232014-05-01 Marek Polacek <polacek@redhat.com>
7124
7125 PR c/43395
7126 * c-typeck.c (c_finish_return): Distinguish between label and variable
7127 when warning about returning local address.
7128
c9379ce2
MP
71292014-05-01 Marek Polacek <polacek@redhat.com>
7130
7131 PR c/29467
7132 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7133 in C89 mode.
7134
d00887e8
MP
71352014-05-01 Marek Polacek <polacek@redhat.com>
7136
7137 PR c/43245
7138 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7139 instead of 0 to WARN_FOR_QUALIFIERS.
7140
5436fa2e
MP
71412014-05-01 Marek Polacek <polacek@redhat.com>
7142
7143 PR c/56989
7144 * c-typeck.c (default_conversion): Use better location for
7145 error call.
7146
f8ed5150
MP
71472014-04-30 Marek Polacek <polacek@redhat.com>
7148
7149 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7150 also when SANITIZE_FLOAT_DIVIDE is on.
7151
8337d1db
MP
71522014-04-30 Marek Polacek <polacek@redhat.com>
7153
7154 PR c/60139
7155 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7156 and pedwarn_init. Use loc insted of input_location.
7157
c4bdc42f
MP
71582014-04-30 Marek Polacek <polacek@redhat.com>
7159
7160 PR c/60351
7161 * c-typeck.c (build_binary_op): Use location when warning about
7162 shift count.
7163
45484dcf
MP
71642014-04-25 Marek Polacek <polacek@redhat.com>
7165
7166 PR c/18079
7167 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7168 always_inline/noinline and hot/cold attributes.
7169
34cf811f
MP
71702014-04-25 Marek Polacek <polacek@redhat.com>
7171
7172 PR c/60114
7173 * c-parser.c (c_parser_initelt): Pass input_location to
7174 process_init_element.
7175 (c_parser_initval): Pass loc to process_init_element.
7176 * c-tree.h (process_init_element): Adjust declaration.
7177 * c-typeck.c (push_init_level): Pass input_location to
7178 process_init_element.
7179 (pop_init_level): Likewise.
7180 (set_designator): Likewise.
7181 (output_init_element): Add location_t parameter. Pass loc to
7182 digest_init.
7183 (output_pending_init_elements): Pass input_location to
7184 output_init_element.
7185 (process_init_element): Add location_t parameter. Pass loc to
7186 output_init_element.
7187
42056eac
JJ
71882014-04-24 Jakub Jelinek <jakub@redhat.com>
7189
7190 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7191 atomic-clause, allow comma in between atomic-clause and
7192 seq_cst.
7193
e162a134
JJ
71942014-04-22 Jakub Jelinek <jakub@redhat.com>
7195
7196 PR c/59073
7197 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7198 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7199
2f6babac
IZ
72002014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7201
7202 PR middle-end/60469
7203 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7204 create_tmp_var instead build_decl for creating temps.
7205 (build_array_notation_expr): Likewise.
7206 (fix_conditional_array_notations_1): Likewise.
7207 (fix_array_notation_expr): Likewise.
7208 (fix_array_notation_call_expr): Likewise.
7209
8edbfaa6
JJ
72102014-03-28 Jakub Jelinek <jakub@redhat.com>
7211
7212 PR c++/60689
7213 * c-tree.h (c_build_function_call_vec): New prototype.
7214 * c-typeck.c (build_function_call_vec): Don't call
7215 resolve_overloaded_builtin here.
7216 (c_build_function_call_vec): New wrapper function around
7217 build_function_call_vec. Call resolve_overloaded_builtin here.
7218 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7219 Call c_build_function_call_vec instead of build_function_call_vec.
7220 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7221 * c-decl.c (finish_decl): Likewise.
7222
7485aeea
MLI
72232014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7224
7225 PR c/55383
7226 * c-typeck.c: Use correct format string in cast-qual warning
7227
b17a8b07
TS
72282014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7229
7230 * c-decl.c (c_decl_attributes): Use
7231 lang_hooks.types.omp_mappable_type.
7232 * c-typeck.c (c_finish_omp_clauses): Likewise.
7233
3af9c5e9
MP
72342014-03-06 Marek Polacek <polacek@redhat.com>
7235
7236 PR c/60197
7237 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7238 of checking tree code.
7239
1c9f5f33
PK
72402014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7241
7242 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7243 (c_parser_parameter_declaration): Likewise.
7244
cc28fc7f
MP
72452014-02-19 Marek Polacek <polacek@redhat.com>
7246
7247 PR c/60195
7248 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7249 Call mark_exp_read on exp.value.
7250 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7251 TREE_ADDRESSABLE on old instead of val.
7252 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7253
b581c05c
PK
72542014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7255
7256 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7257 C_EXPR_APPEND by vec_safe_push.
7258 * c-tree.h (C_EXPR_APPEND): Remove.
7259
81e5eca8
MP
72602014-01-31 Marek Polacek <polacek@redhat.com>
7261
7262 PR c/59963
7263 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7264 build_function_call_vec.
7265 (build_function_call): Likewise.
7266 (build_atomic_assign): Likewise.
7267 (build_function_call_vec): Add arg_loc parameter. Use it.
7268 (convert_arguments): Likewise.
7269 (convert_for_assignment): Rename rhs_loc to expr_loc.
7270 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7271 (c_parser_objc_keywordexpr): Likewise.
7272 (c_parser_postfix_expression_after_primary): Call
7273 build_function_call_vec with expr_loc rather than op_loc.
7274 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7275 build_function_call_vec.
7276 (c_parser_expr_list): Add locations parameter. Fill it with locations
7277 of function arguments.
7278 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7279
68fca595
MP
72802014-01-30 Marek Polacek <polacek@redhat.com>
7281
7282 PR c/59940
7283 * c-typeck.c (build_function_call_vec): Use loc parameter.
7284 (convert_arguments): Add location parameter. Use it.
7285 (ep_convert_and_check): Likewise.
7286 (build_atomic_assign): Adjust convert_for_assignment call.
7287 (build_modify_expr): Likewise.
7288 (digest_init): Likewise.
7289 (c_finish_return): Likewise.
7290 (build_conditional_expr): Adjust ep_convert_and_check calls.
7291 (convert_for_assignment): Add rhs_loc parameter. Use it.
7292 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7293 calls.
7294
fa337f3a
RB
72952014-01-30 Richard Biener <rguenther@suse.de>
7296
7297 PR c/59905
7298 * c-typeck.c (build_function_call_vec): Do not replace calls
7299 to a function via an incompatible type with a runtime abort.
7300
b72271b9
BI
73012014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7302
7303 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7304 flag_enable_cilkplus with flag_cilkplus.
7305 (c_parser_direct_declarator_inner): Likewise.
7306 (c_parser_attribute_any_word): Likewise.
7307 (c_parser_attributes): Likewise.
7308 (c_parser_compound_statement): Likewise.
7309 (c_parser_statement_after_labels): Likewise.
7310 (c_parser_if_statement): Likewise.
7311 (c_parser_switch_statement): Likewise.
7312 (c_parser_do_statement): Likewise.
7313 (c_parser_for_statement): Likewise.
7314 (c_parser_unary_expression): Likewise.
7315 (c_parser_postfix_expression): Likewise.
7316 (c_parser_postfix_expression_after_primary): Likewise.
7317 (c_parser_postfix_expression_after_primary): Likewise.
7318 (c_parser_omp_clause_name): Likewise.
7319 (c_finish_omp_declare_simd): Likewise.
7320 (c_parser_cilk_verify_simd): Likewise.
7321 * c-typeck.c (build_array_ref): Likewise.
7322 (build_function_call_vec): Likewise.
7323 (convert_arguments): Likewise.
7324 (build_compound_expr): Likewise.
7325 (c_finish_return): Likewise.
7326 (c_finish_if_stmt): Likewise.
7327 (c_finish_loop): Likewise.
7328 (build_binary_op): Likewise.
7329
393e8e8b
MP
73302014-01-23 Marek Polacek <polacek@redhat.com>
7331
7332 PR c/59846
7333 * c-typeck.c (parser_build_binary_op): Use location instead of
7334 input_location.
7335 (build_binary_op): Pass location to shorten_compare.
7336
f04dda30
MP
73372014-01-23 Marek Polacek <polacek@redhat.com>
7338
7339 PR c/58346
7340 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7341 an empty aggregate.
7342
789eadcd
MP
73432014-01-23 Marek Polacek <polacek@redhat.com>
7344
7345 PR c/59871
7346 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7347 of a comma expression.
7348 (emit_side_effect_warnings): Likewise.
7349
40f14e9f
BI
73502014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7351
7352 PR c/59825
7353 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7354 function to use walk_tree and moved a lot of its functionality to
7355 expand_array_notations.
7356 (expand_array_notations): New function.
7357
74558dd9
BI
73582014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7359
7360 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7361 attribute an attribute without value.
7362
652fea39
JJ
73632014-01-23 Jakub Jelinek <jakub@redhat.com>
7364
7365 PR middle-end/58809
7366 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7367 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7368
f34f1c87
MP
73692014-01-22 Marek Polacek <polacek@redhat.com>
7370
7371 PR c/59891
7372 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7373 of remove_c_maybe_const_expr on op1 and op2.
7374
241f845a
JJ
73752014-01-15 Jakub Jelinek <jakub@redhat.com>
7376
7377 PR c/58943
7378 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7379 effects, preevaluate rhs using SAVE_EXPR first.
7380
9a74f20c
BI
73812014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7382
7383 PR c++/59631
7384 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7385 statements with if-elseif statements.
7386
96066ce1
MP
73872014-01-06 Marek Polacek <polacek@redhat.com>
7388
7389 PR c/57773
7390 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7391 defined bit-field types only in ISO C.
7392
23a5b65a
RS
73932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7394
7395 Update copyright years
7396
f9030485
RS
73972014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7398
7399 * c-array-notation.c: Use the standard form for the copyright notice.
7400
41958c28
BI
74012013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7402
7403 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7404 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7405 field in parser is not empty. If not-empty, call the function
7406 c_parser_finish_omp_declare_simd.
7407 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7408 between SIMD-enabled functions and #pragma simd. Added new parameter.
7409 (c_parser_cilk_all_clauses): Modified the usage of the function
7410 c_parser_cilk_clause_vectorlength as mentioned above.
7411 (c_parser_cilk_simd_fn_vector_attrs): New function.
7412 (c_finish_cilk_simd_fn_tokens): Likewise.
7413 (is_cilkplus_vector_p): Likewise.
7414 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7415 "nomask," and "mask" strings in clause name.
7416 (c_parser_omp_all_clauses): Added 3 new case statements:
7417 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7418 PRAGMA_CILK_CLAUSE_NOMASK.
7419 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7420 check for vector attribute and if so call the function
7421 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7422 called the function c_finish_cilk_simd_fn_tokens.
7423 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7424 parser field is non-empty. If so, parse them as you would parse
7425 the omp declare simd pragma.
7426 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7427 Added a check when step is a parameter and flag it as error.
7428 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7429 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7430 pragma_omp_clause.
7431
cef0fd0e
TS
74322013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7433
7434 * c-parser.c (c_parser_omp_parallel): Fix description.
7435
12893402
BI
74362013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7437
7438 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7439 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7440 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7441 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7442
296674db
JM
74432013-12-04 Joseph Myers <joseph@codesourcery.com>
7444
7445 PR c/52023
7446 * c-parser.c (c_parser_alignas_specifier): Use
7447 c_sizeof_or_alignof_type instead of c_alignof.
7448 (c_parser_alignof_expression): Likewise, with min_alignof
7449 parameter depending on alignof spelling used.
7450
edd28054
MP
74512013-12-04 Marek Polacek <polacek@redhat.com>
7452
7453 PR c/54113
7454 * c-decl.c (start_function): Don't warn for missing prototype for
7455 inline functions.
7456
da0fc454
MP
74572013-12-03 Marek Polacek <polacek@redhat.com>
7458
7459 PR c/59351
7460 * c-decl.c (build_compound_literal): Allow compound literals with
7461 empty initial value.
7462
4c2ecab0
JM
74632013-12-02 Joseph Myers <joseph@codesourcery.com>
7464
7465 PR c/58235
7466 * c-typeck.c (build_modify_expr): Diagnose assignment to
7467 expression with array type.
7468
340baef7
JM
74692013-11-29 Joseph Myers <joseph@codesourcery.com>
7470
7471 PR c/42262
7472 * c-typeck.c (process_init_element): Do not treat a string as
7473 initializing a whole array when used with a designator for an
7474 individual element.
7475
6763b9f7
JM
74762013-11-29 Joseph Myers <joseph@codesourcery.com>
7477
7478 PR c/57574
7479 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7480 an inline function following a static declaration.
7481
e7bd1de1
JJ
74822013-11-28 Jakub Jelinek <jakub@redhat.com>
7483
7484 PR c/59310
7485 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7486 to p_name before calling c_parser_omp_teams instead of after.
7487 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7488 argument. Remove unused p_name variable.
7489
0136f8f0
AH
74902013-11-27 Aldy Hernandez <aldyh@redhat.com>
7491 Jakub Jelinek <jakub@redhat.com>
7492
7493 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7494 external_scope is NULL.
7495
241b71bb
TV
74962013-11-27 Tom de Vries <tom@codesourcery.com>
7497 Marc Glisse <marc.glisse@inria.fr>
7498
7499 PR c++/59032
7500 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7501
2fb9a547
AM
75022013-11-22 Andrew MacLeod <amacleod@redhat.com>
7503
7504 * c-typeck.c: Add required include files from gimple.h.
7505
8400e75e
DM
75062013-11-22 David Malcolm <dmalcolm@redhat.com>
7507
7508 * c-decl.c (define_label, shadow_tag_warned)
7509 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7510 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7511 (declspecs_add_type): Remove use of in_system_header macro.
7512 * c-parser.c (c_parser_unary_expression): Likewise.
7513 * c-typeck.c (store_init_value, process_init_element)
7514 (c_start_case): Likewise.
7515
7516 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7517 macro.
7518
7519 * c-parser.c (c_parser_set_source_position_from_token): Remove
7520 reference to in_system_header from comment.
7521
386b1f1f
RS
75222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7523
7524 * c-decl.c (grokdeclarator): Update comment to refer to
7525 tree_to_[su]hwi rather than tree_low_cst.
7526
ae7e9ddd
RS
75272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7528
7529 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7530 tree_to_uhwi throughout.
7531
9439e9a1
RS
75322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7533
7534 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7535 throughout.
7536
9541ffee
RS
75372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7538
7539 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7540 throughout.
7541
c02065fc
AH
75422013-11-15 Aldy Hernandez <aldyh@redhat.com>
7543
7544 * c-parser.c (c_parser_cilk_simd): New.
7545 (c_parser_cilk_verify_simd): New.
7546 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7547 (c_parser_omp_for_loop): Add case for NE_EXPR.
7548 Set c_break_label for CILK_SIMD.
7549 (c_parser_cilk_clause_vectorlength): New.
7550 (c_parser_cilk_clause_linear): New.
7551 (c_parser_cilk_clause_name): New.
7552 (c_parser_cilk_all_clauses): New.
7553 * c-typeck.c (build_unary_op): Pass location argument to
7554 readonly_error.
7555 (build_modify_expr): Same.
7556 (build_asm_expr): Same.
7557 (c_finish_bc_stmt): Error on break/continue in loops.
7558
18f429e2
AM
75592013-11-14 Andrew MacLeod <amacleod@redhat.com>
7560
7561 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7562
d8a2d370
DN
75632013-11-14 Diego Novillo <dnovillo@google.com>
7564
7565 * c-decl.c: Include print-tree.h.
7566 Include stor-layout.h.
7567 Include varasm.h.
7568 Include attribs.h.
7569 Include stringpool.h.
7570 * c-lang.c: Include fold-const.h.
7571 * c-parser.c: Include stringpool.h.
7572 Include attribs.h.
7573 Include stor-layout.h.
7574 Include varasm.h.
7575 Include trans-mem.h.
7576 * c-typeck.c: Include stor-layout.h.
7577 Include trans-mem.h.
7578 Include varasm.h.
7579 Include stmt.h.
7580
38b7bc7f
JM
75812013-11-13 Joseph Myers <joseph@codesourcery.com>
7582
7583 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7584 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7585 __auto_type.
7586 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7587 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7588 RID_AUTO_TYPE.
7589 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7590 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7591 (c_parser_declarator, c_parser_direct_declarator_inner)
7592 (c_parser_parameter_declaration, c_parser_type_name): All callers
7593 changed.
7594 (c_parser_declaration_or_fndef): Handle declarations with type
7595 determined from the initializer.
7596
45b0be94
AM
75972013-11-12 Andrew MacLeod <amacleod@redhat.com>
7598
18f429e2 7599 * c-typeck.c: Include gimplify.h.
45b0be94 7600
582d9b50
JM
76012013-11-12 Joseph Myers <joseph@codesourcery.com>
7602
7603 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7604 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7605 comment.
7606 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7607 or _Thread_local as appropriate in diagnostics.
7608 (build_null_declspecs): Initialize ret->thread_gnu_p.
7609 (declspecs_add_scspec): Handle either __thread or _Thread_local
7610 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7611 pedantic. Do not disallow _Thread_local extern and _Thread_local
7612 static.
7613
267bac10
JM
76142013-11-07 Joseph Myers <joseph@codesourcery.com>
7615 Andrew MacLeod <amacleod@redhat.com>
7616
7617 * c-aux-info.c (gen_type): Handle atomic qualifier.
7618 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7619 qualifiers when compating types.
7620 (shadow_tag_warned): Handle atomic_p in declspecs.
7621 (quals_from_declspecs): Likewise.
7622 (start_decl): Use c_type_promotes_to when promoting argument
7623 types.
7624 (grokdeclarator): Handle _Atomic.
7625 (get_parm_info): Diagnose any qualifier on "void" as only
7626 parameter.
7627 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7628 comparing types. Use c_type_promotes_to when promoting argument
7629 types.
7630 (finish_function): Use c_type_promotes_to when promoting argument
7631 types.
7632 (build_null_declspecs): Handle atomic_p in declspecs.
7633 (declspecs_add_qual): Handle RID_ATOMIC.
7634 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7635 (c_token_starts_declspecs): Handle RID_ATOMIC.
7636 (c_parser_declspecs): Handle atomic type specifiers and
7637 qualifiers.
7638 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7639 from types of expressions with atomic type.
7640 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7641 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7642 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7643 (c_parser_statement_after_labels, c_parser_switch_statement)
7644 (c_parser_for_statement, c_parser_expr_no_commas)
7645 (c_parser_conditional_expression, c_parser_binary_expression)
7646 (c_parser_cast_expression, c_parser_unary_expression)
7647 (c_parser_postfix_expression)
7648 (c_parser_postfix_expression_after_primary, c_parser_expression):
7649 Use convert_lvalue_to_rvalue.
7650 (c_parser_expression_conv, c_parser_expr_list): Document
7651 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7652 (c_parser_objc_synchronized_statement): Use
7653 convert_lvalue_to_rvalue.
7654 (c_parser_objc_selector): Handle RID_ATOMIC.
7655 (c_parser_objc_receiver, c_parser_array_notation): Use
7656 convert_lvalue_to_rvalue.
7657 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7658 _Atomic (type-name).
7659 (struct c_declspecs): Add atomic_p field.
7660 (convert_lvalue_to_rvalue): Declare.
7661 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7662 corresponding atomic types.
7663 (qualify_type): Don't add _Atomic qualifiers from second argument.
7664 (comp_target_types): Do not allow _Atomic mismatches.
7665 (type_lists_compatible_p): Do not remove atomic qualifiers when
7666 comparing types.
7667 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7668 (build_atomic_assign): New functions.
7669 (build_unary_op): Use build_atomic_assign for atomic increment and
7670 decrement.
7671 (build_conditional_expr): Do not treat _Atomic void as a qualified
7672 version of void.
7673 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7674 (find_anonymous_field_with_type, convert_to_anonymous_field)
7675 (convert_for_assignment): Do not remove atomic qualifiers when
7676 comparing types.
7677 (digest_init): Do not accept initialization of arrays of atomic
7678 elements by string constants.
7679 (build_asm_expr): Use convert_lvalue_to_rvalue.
7680 (build_binary_op): Do not treat _Atomic void as a qualified
7681 version of void.
7682
0c249d4b
DD
76832013-11-06 DJ Delorie <dj@redhat.com>
7684
7685 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7686 both explicit and builtin, print the location of the explicit one.
7687
6d7f7e0a
TB
76882013-11-05 Tobias Burnus <burnus@net-b.de>
7689
7690 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7691 c_parser_omp_distribute, c_parser_omp_teams,
7692 c_parser_omp_target, c_parser_omp_declare): Handle
7693 -fopenmp-simd.
7694
b906f4ca
MP
76952013-11-03 Marek Polacek <polacek@redhat.com>
7696
7697 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7698
ee1d5a02
JJ
76992013-11-01 Jakub Jelinek <jakub@redhat.com>
7700
7701 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7702 check_dup_generic at the end, unless remove is true.
7703 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7704 remove = true;.
7705 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7706
5a9785fb
JJ
77072013-10-31 Jakub Jelinek <jakub@redhat.com>
7708
7709 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7710 with decl that is not pointer nor array.
7711
939b37da
BI
77122013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7713
7714 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7715 a spawning function is found.
7716 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7717 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7718 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7719 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7720 case.
7721 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7722 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7723 expr.
7724 (c_finish_return): Added a check to reject _Cilk_spawn in return
7725 expression.
7726 (build_cilk_spawn): New function.
7727 (build_cilk_sync): Likewise.
7728 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7729
d4af74d4
TB
77302013-10-27 Tobias Burnus <burnus@net-b.de>
7731
7732 PR other/33426
7733 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7734 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7735 (c_parser_statement_after_labels): Update calls.
7736
d73749df 77372013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7738
7739 PR other/33426
7740 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7741 Handle PRAGMA_IVDEP.
7742 (c_parser_statement_after_labels): Update call.
7743
f28aa681
MP
77442013-10-24 Marek Polacek <polacek@redhat.com>
7745
7746 * c-parser.c (c_parser_struct_declaration): Add a comment.
7747 (c_parser_declarator): Don't allow _Alignas here.
7748
0645c1a2
AM
77492013-10-17 Andrew MacLeod <amacleod@redhat.com>
7750
7751 * c-parser.c: Include omp-low.h.
7752 * c-typeck.c: Likewise.
7753
568a31f2
MP
77542013-10-17 Marek Polacek <polacek@redhat.com>
7755
7756 PR c/58267
7757 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7758 Document syntax of the array-declarator.
7759 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7760 are not permitted.
7761 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7762 (c_parser_struct_declaration): Likewise.
7763 (c_parser_declarator): Likewise.
7764 (c_parser_direct_declarator_inner): Likewise.
7765 (c_parser_parameter_declaration): Likewise.
7766 (c_parser_type_name): Likewise.
7767
acf0174b
JJ
77682013-10-11 Jakub Jelinek <jakub@redhat.com>
7769
7770 * c-lang.h (current_omp_declare_target_attribute): New extern
7771 decl.
7772 * c-parser.c: Include c-lang.h.
7773 (struct c_parser): Change tokens to c_token *.
7774 Add tokens_buf field. Change tokens_avail type to unsigned int.
7775 (c_parser_consume_token): If parser->tokens isn't
7776 &parser->tokens_buf[0], increment parser->tokens.
7777 (c_parser_consume_pragma): Likewise.
7778 (enum pragma_context): Add pragma_struct and pragma_param.
7779 (c_parser_external_declaration): Adjust
7780 c_parser_declaration_or_fndef caller.
7781 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7782 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7783 Adjust recursive call.
7784 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7785 of pragma_external.
7786 (c_parser_parameter_declaration): Use pragma_param instead of
7787 pragma_external.
7788 (c_parser_compound_statement_nostart, c_parser_label,
7789 c_parser_for_statement): Adjust
7790 c_parser_declaration_or_fndef callers.
7791 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7792 it through to c_parser_conditional_expression.
7793 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7794 pass it through to c_parser_binary_expression. Adjust recursive
7795 call.
7796 (c_parser_binary_expression): Remove prec argument, add
7797 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7798 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7799 binop matches it, use build2 instead of parser_build_binary_op.
7800 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7801 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7802 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7803 Handle pragma_struct and pragma_param the same as pragma_external.
7804 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7805 (c_parser_omp_variable_list): Parse array sections for
7806 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7807 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7808 (c_parser_omp_clause_reduction): Handle user defined reductions.
7809 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7810 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7811 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7812 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7813 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7814 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7815 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7816 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7817 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7818 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7819 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7820 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7821 (c_parser_omp_for_loop): Add CODE argument, pass it through
7822 to c_finish_omp_for. Change last argument to cclauses,
7823 and adjust uses to grab parallel clauses from the array of all
7824 the split clauses. Adjust c_parser_binary_expression,
7825 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7826 (omp_split_clauses): New function.
7827 (c_parser_omp_simd): New function.
7828 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7829 Allow the function to be called also when parsing combined constructs,
7830 and call c_parser_omp_simd when parsing for simd.
7831 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7832 #pragma omp section, require exactly one structured-block instead of
7833 sequence of statements.
7834 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7835 Allow the function to be called also when parsing combined constructs.
7836 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7837 Allow the function to be called also when parsing combined
7838 constructs.
7839 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7840 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7841 c_parser_omp_teams, c_parser_omp_target_data,
7842 c_parser_omp_target_update, c_parser_omp_target,
7843 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7844 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7845 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7846 (c_parser_omp_construct): Add p_name and mask vars. Handle
7847 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7848 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7849 and c_parser_omp_sections callers.
7850 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7851 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7852 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7853 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7854 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7855 OMP_CLAUSE_DEPEND.
7856 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7857 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7858 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7859 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7860 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7861 * c-typeck.c: Include tree-inline.h.
7862 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7863 handle_omp_array_sections_1, handle_omp_array_sections,
7864 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7865 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7866 user defined reductions.
7867 (c_tree_equal): New function.
7868 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7869 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7870 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7871 c_check_omp_declare_reduction_r): New prototypes.
7872 * c-decl.c (current_omp_declare_target_attribute): New variable.
7873 (c_decl_attributes): New function.
7874 (start_decl, start_function): Use it instead of decl_attributes.
7875 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7876 c_omp_reduction_decl, c_omp_reduction_lookup,
7877 c_check_omp_declare_reduction_r): New functions.
7878
0a6c2227
TT
78792013-09-25 Tom Tromey <tromey@redhat.com>
7880
7881 * Make-lang.in (c/gccspec.o): Remove.
7882 (CFLAGS-c/gccspec.o): New variable.
7883 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7884 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7885 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7886
f3bc55f0
TT
78872013-09-25 Tom Tromey <tromey@redhat.com>
7888
7889 * Make-lang.in (c/gccspec.o): Don't use subshell.
7890
a24d975c
MP
78912013-09-18 Marek Polacek <polacek@redhat.com>
7892
7893 PR sanitize/58443
7894 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7895 Remove unnecessary check.
7896
ce6923c5
MP
78972013-09-18 Marek Polacek <polacek@redhat.com>
7898
7899 PR sanitizer/58411
7900 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7901 no_sanitize_undefined attribute.
7902
a1e51df9
KT
79032013-09-13 Kai Tietz <ktietz@redhat.com>
7904
7905 PR target/57848
7906 * c-decl.c (c_builtin_function_ext_scope): Remove
7907 wrong assumption that it is never called on prexisting
7908 symbol.
7909
0af94e6f
JR
79102013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7911
7912 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7913
20059c8b
GDR
79142013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7915
7916 * c-objc-common.c (c_tree_printer): Tidy.
7917
de5a5fa1
MP
79182013-08-30 Marek Polacek <polacek@redhat.com>
7919
7920 * c-typeck.c (build_binary_op): Add division by zero and shift
7921 instrumentation.
7922
2531a1d9 79232013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7924 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7925
6e2bcc98 7926 PR c/35649
2531a1d9
JR
7927 * c-typeck.c (c_common_type): Prefer double_type_node over
7928 other REAL_TYPE types with the same precision.
7929 (convert_arguments): Likewise.
7930
025311c4
GDR
79312013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7932
7933 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7934 (c_initialize_diagnostics): Call a destructor for the early printer.
7935
da6ca2b5
GDR
79362013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7937
7938 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7939 printer initialization.
7940
318cda85 79412013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7942
318cda85
BI
7943 PR c/57490
7944 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7945 check for truth values.
7946 (expand_array_notation_exprs): Added truth values case. Removed an
7947 unwanted else. Added for-loop to walk through subtrees in default
7948 case.
7949
b066401f
GDR
79502013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7951
7952 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7953
fb48aadc
JM
79542013-07-23 Joseph Myers <joseph@codesourcery.com>
7955
7956 * c-parser.c (struct c_generic_association): Fix typo.
7957
433cc7b0
TT
79582013-07-23 Tom Tromey <tromey@redhat.com>
7959 Joseph Myers <joseph@codesourcery.com>
7960
7961 * c-parser.c (struct c_generic_association): New.
7962 (c_generic_association_d): New typedef.
7963 (c_parser_generic_selection): New function.
7964 (c_parser_postfix_expression): Handle RID_GENERIC.
7965
26d40c3d
JM
79662013-07-13 Jason Merrill <jason@redhat.com>
7967
7968 PR c++/57793
7969 * c-decl.c (finish_struct): Check for too-large class.
7970
ecdbd01a 79712013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7972
7973 PR c/57821
7974 * c-typeck.c (set_init_index): When folding, check for index overflow.
7975
1141ed3f
BI
79762013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7977
7978 * c-parser.c (c_parser_array_notation): Removed rejection of array
7979 notations in an array of function pointers.
7980
713b46fa
BI
79812013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7982
7983 * c-array-notation.c (make_triplet_val_inv): New function.
7984 (create_cmp_incr): Likewise.
7985 (create_array_refs): Likewise.
7986 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7987 Also modularized common parts between functions and called the function.
7988 (build_array_notation_expr): Likewise.
7989 (fix_conditional_array_notations_1): Likewise.
7990 (fix_array_notation_expr): Likewise.
7991 (fix_array_notation_call_expr): Likewise.
7992
92f20202
MP
79932013-06-18 Marek Polacek <polacek@redhat.com>
7994
7995 PR c/57630
7996 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7997
73a23b06
BI
79982013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7999
8000 * c-array-notation.c (build_array_notation_expr): Reject array notation
8001 mismatch between LHS and RHS even inside a call_expr. Also, removed
8002 a couple while statements that were dead code.
8003
00b8517d
BI
80042013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8005
8006 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8007 excessive precision expressions in function parameters. Also removed
8008 couple unwanted while statements.
8009
1509bdda
BI
80102013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8011
8012 * c-array-notation.c (expand_array_notation_exprs): Added
8013 ARRAY_NOTATION_REF case.
ab20d992 8014
d60f1706
BI
80152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8016
8017 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8018 function to c-family/array-notation-common.c.
8019 (is_cilkplus_reduce_builtin): Likewise.
8020 (find_rank): Likewise.
8021 (extract_array_notation_exprs): Likewise.
8022 (replace_array_notations): Likewise.
8023 (find_inv_trees): Likewise.
8024 (replace_inv_trees): Likewise.
8025 (contains_array_notation_expr): Likewise.
8026 (find_correct_array_notation_type): Likewise.
8027 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8028 (struct inv_list): Moved this to c-family/array-notation-common.c.
8029 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8030
6d6efbb3
BI
80312013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8032
8033 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8034 reduction functions outside the for-loop. Added a check if the fundecl
8035 is non-NULL. Finally, removed an unwanted if-statement, and made the
8036 body unconditional.
8037
25c22937
BI
80382013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8039
8040 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8041 condition of the if-statement matches the rank of else-block and then-
8042 block when array notations are used.
8043 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8044 expression after the entire function body is parsed.
8045 (c_parser_expr_no_commas): Delayed creating array notation expressions
8046 to the end of function parsing.
8047 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8048 whole if-statement instead of just the condition.
ab20d992 8049 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8050
edd25645
BI
80512013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8052
8053 PR c/57474
8054 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8055 array to NULL_TREE if they are unused. Also added a check for the
8056 field to be NULL before its fields are used in future.
ab20d992 8057
065ce7f1
RO
80582013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8059
8060 PR bootstrap/57450
8061 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8062 (build_array_notation_expr): Likewise.
8063
36536d79
BI
80642013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8065
8066 * c-typeck.c (build_array_ref): Added a check to see if array's
8067 index is greater than one. If true, then emit an error.
8068 (build_function_call_vec): Exclude error reporting and checking
8069 for builtin array-notation functions.
8070 (convert_arguments): Likewise.
8071 (c_finish_return): Added a check for array notations as a return
8072 expression. If true, then emit an error.
8073 (c_finish_loop): Added a check for array notations in a loop
8074 condition. If true then emit an error.
8075 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8076 (build_binary_op): Added a check for array notation expr inside
8077 op1 and op0. If present, we call another function to find correct
8078 type.
8079 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8080 * c-parser.c (c_parser_compound_statement): Check if array
8081 notation code is used in tree, if so, then transform them into
8082 appropriate C code.
8083 (c_parser_expr_no_commas): Check if array notation is used in LHS
8084 or RHS, if so, then build array notation expression instead of
8085 regular modify.
8086 (c_parser_postfix_expression_after_primary): Added a check for
8087 colon(s) after square braces, if so then handle it like an array
8088 notation. Also, break up array notations in unary op if found.
8089 (c_parser_direct_declarator_inner): Added a check for array
8090 notation.
8091 (c_parser_compound_statement): Added a check for array notation in
8092 a stmt. If one is present, then expand array notation expr.
8093 (c_parser_if_statement): Likewise.
8094 (c_parser_switch_statement): Added a check for array notations in
8095 a switch statement's condition. If true, then output an error.
8096 (c_parser_while_statement): Similarly, but for a while.
8097 (c_parser_do_statement): Similarly, but for a do-while.
8098 (c_parser_for_statement): Similarly, but for a for-loop.
8099 (c_parser_unary_expression): Check if array notation is used in a
8100 pre-increment or pre-decrement expression. If true, then expand
8101 them.
8102 (c_parser_array_notation): New function.
8103 * c-array-notation.c: New file.
8104 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8105
cd192ccc
MS
81062013-05-23 Mike Stump <mikestump@comcast.net>
8107
8108 * c-typeck.c (convert_for_assignment): Handle references to memory
8109 spaces better.
8110
427b248d
JM
81112013-05-16 Jason Merrill <jason@redhat.com>
8112
8113 * Make-lang.in (cc1$(exeext)): Use link mutex.
8114
44d90fe1
PC
81152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8116
8117 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8118 to simply use OPT_Wpointer_arith.
8119 (build_unary_op): Likewise.
8120
4e7d7b3d
JJ
81212013-04-03 Jakub Jelinek <jakub@redhat.com>
8122
8123 PR c/19449
8124 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8125 argument. If set, or it temporarily for parsing of the first
8126 argument into force_folding_builtin_constant_p.
8127 (c_parser_postfix_expression): Adjust callers.
8128
839b422f
RB
81292013-03-21 Richard Biener <rguenther@suse.de>
8130
8131 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8132 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8133
2ee028f1
MP
81342013-02-12 Marek Polacek <polacek@redhat.com>
8135
8136 PR c/44938
8137 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8138 origtypes to NULL.
8139
8824edff
JJ
81402013-01-24 Jakub Jelinek <jakub@redhat.com>
8141
8142 PR c/56078
8143 * c-typeck.c (set_nonincremental_init_from_string): If
8144 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8145 returned false.
8146 (process_init_element): Likewise.
8147
eadd3d0d
JJ
81482012-12-20 Jakub Jelinek <jakub@redhat.com>
8149
8150 PR c++/55619
8151 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8152 argument, don't call default_function_array_conversion
8153 nor c_fully_fold here.
8154 (c_parser_asm_statement): Adjust callers.
8155 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8156 and outputs here, and call default_function_array_conversion
8157 on inputs that don't need to be addressable.
8158
f8a93a2e
JJ
81592012-12-18 Jakub Jelinek <jakub@redhat.com>
8160
8161 PR c/39464
8162 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8163 warning require that both c_common_unsigned_type as well as
8164 c_common_signed_type is the same for both mvl and mvr types.
8165
9771b263
DN
81662012-11-16 Diego Novillo <dnovillo@google.com>
8167
8168 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8169
8170 * c-common.c: Use new vec API in vec.h.
8171 * c-common.h: Likewise.
8172 * c-gimplify.c: Likewise.
8173 * c-pragma.c: Likewise.
8174 * c-pretty-print.c: Likewise.
8175 * c-pretty-print.h: Likewise.
8176 * c-semantics.c: Likewise.
8177 * c-decl.c: Likewise.
8178 * c-parser.c: Likewise.
8179 * c-tree.h: Likewise.
8180 * c-typeck.c: Likewise.
8181
880661a4
JW
81822012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8183
8184 PR c++/54930
8185 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8186
077d1abe
MLI
81872012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8188
8189 PR c/53066
8190 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8191 shadows a function, unless the variable is a function or a
8192 pointer-to-function.
8193
3a785c97
JJ
81942012-10-12 Jakub Jelinek <jakub@redhat.com>
8195
8196 PR c/54381
8197 * c-parser.c (struct c_tree_loc_pair): Removed.
8198 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8199 add location_t * and tree * arguments, fill in array of 3
8200 sizeof_arg trees and corresponding locs.
8201 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8202 c_parser_expr_list callers.
8203 (c_parser_postfix_expression_after_primary): Likewise. Pass
8204 array of 3 sizeof_arg trees and locs (corresponding to first
8205 3 arguments) to sizeof_pointer_memaccess_warning.
8206
703c8606
LC
82072012-10-09 Lawrence Crowl <crowl@google.com>
8208
8209 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8210 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8211 hash table.
8212
5d9de0d0
PC
82132012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8214
8215 PR c++/54194
8216 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8217 call.
8218
a212e43f
MG
82192012-10-09 Marc Glisse <marc.glisse@inria.fr>
8220
8221 PR c++/54427
8222 * c-typeck.c: Include c-common.h.
8223 (enum stv_conv): Moved to c-common.h.
8224 (scalar_to_vector): Moved to c-common.c.
8225 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8226 * Make-lang.in: c-typeck.c depends on c-common.h.
8227
3b78de56
AC
82282012-10-04 Arnaud Charlet <charlet@adacore.com>
8229
8230 * c-decl.c (c_write_global_declarations): Fix handling of
8231 -fdump-ada-spec*.
8232
78c60e3d
SS
82332012-09-30 Sharad Singhai <singhai@google.com>
8234
8235 * c-decl.c (c_write_global_declarations): Use a different method
8236 to determine if the dump has ben initialized.
8237
9f33203d
JM
82382012-09-14 Joseph Myers <joseph@codesourcery.com>
8239
8240 PR c/54552
8241 * c-typeck.c (c_cast_expr): When casting to a type requiring
8242 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8243 c_fully_fold first.
8244
a27d595d
JM
82452012-09-14 Joseph Myers <joseph@codesourcery.com>
8246
8247 PR c/54103
8248 * c-typeck.c (build_unary_op): Pass original argument of
8249 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8250 any C_MAYBE_CONST_EXPR, if it has integer operands.
8251 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8252 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8253 to c_objc_common_truthvalue_conversion, then remove any
8254 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8255 c_objc_common_truthvalue_conversion not
8256 c_common_truthvalue_conversion.
8257 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8258 call note_integer_operands for arguments with integer operands
8259 that are not integer constants.
8260
9feb29df
JJ
82612012-09-13 Jakub Jelinek <jakub@redhat.com>
8262
8263 PR c/54559
8264 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8265 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8266
d409320c
JJ
82672012-08-31 Jakub Jelinek <jakub@redhat.com>
8268
8269 PR c/54428
8270 * c-convert.c (convert): Don't call fold_convert_loc if
8271 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8272 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8273 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8274
6265d07c
JJ
82752012-08-24 Jakub Jelinek <jakub@redhat.com>
8276
8277 PR c/54355
8278 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8279 for nested and empty_ok arguments in the call to
8280 c_parser_declaration_or_fndef.
8281
1a4049e7
JJ
82822012-08-17 Jakub Jelinek <jakub@redhat.com>
8283
8284 * c-tree.h (c_last_sizeof_arg): Declare.
8285 * c-parser.c (struct c_tree_loc_pair): New type.
8286 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8287 non-NULL.
8288 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8289 (c_parser_postfix_expression_after_primary): Likewise. Call
8290 sizeof_pointer_memaccess_warning if needed.
8291 (sizeof_ptr_memacc_comptypes): New function.
8292 * c-typeck.c (c_last_sizeof_arg): New global variable.
8293 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8294
0229aee9
UB
82952012-07-24 Uros Bizjak <ubizjak@gmail.com>
8296
8297 * c-lang.h (lang_decl): Add variable_size GTY option.
8298
7ee2468b
SB
82992012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8300
8301 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8302 * Make-lang.in: Fix dependencies.
8303
d4a10d0a
SB
83042012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8305
8306 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8307 and add language Makefile hooks.
8308 * config-lang.in: New file.
8309 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8310 add the required "normal" config-lang.in rules.
8311 * c-lang.h: Moved from gcc/ to here.
8312 * c-tree.h: Likewise.
8313 * c-objc-common.c: Likewise.
8314 * c-objc-common.h: Likewise.
8315 * c-typeck.c: Likewise.
8316 * c-convert.c: Likewise.
8317 * c-lang.c: Likewise.
8318 * c-aux-info.c: Likewise.
8319 * c-errors.c: Likewise.
8320 * gccspec.c: Likewise.
8321 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8322 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8323\f
877e3c2a 8324Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8325
8326Copying and distribution of this file, with or without modification,
8327are permitted in any medium without royalty provided the copyright
8328notice and this notice are preserved.