re PR c++/71349 (Combined async target clause parsing issues)
[gcc.git] / gcc / c / ChangeLog
1 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/71349
4 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5 when combined with target construct.
6
7 2016-05-26 Jakub Jelinek <jakub@redhat.com>
8
9 * c-parser.c (c_parser_omp_clause_schedule): Warn if
10 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
11
12 2016-05-25 Marek Polacek <polacek@redhat.com>
13
14 PR c/71265
15 * c-decl.c (c_make_fname_decl): Don't check seen_error.
16
17 PR c/71266
18 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
19
20 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
21
22 * c-parser.c (c_parser_oacc_declare): Add support for
23 GOMP_MAP_FIRSTPRIVATE_POINTER.
24 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
25 argument with enum c_omp_region_type ort.
26 (handle_omp_array_sections): Likewise. Update call to
27 handle_omp_array_sections_1.
28 (c_finish_omp_clauses): Add specific errors and warning messages for
29 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
30 call to handle_omp_array_sections.
31
32 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
33
34 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
35
36 2016-05-24 Richard Biener <rguenther@suse.de>
37
38 PR middle-end/70434
39 PR c/69504
40 * c-typeck.c (build_array_ref): Do not complain about indexing
41 non-lvalue vectors. Adjust for function name change.
42
43 2016-05-20 Martin Sebor <msebor@redhat.com>
44
45 PR c/71115
46 * c-typeck.c (error_init): Use
47 expansion_point_location_if_in_system_header.
48 (warning_init): Same.
49
50 2016-05-19 David Malcolm <dmalcolm@redhat.com>
51
52 PR c/71171
53 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
54 in error-handling.
55 (c_parser_postfix_expression): Likewise.
56 * c-tree.h (c_expr::set_error): New method.
57 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
58 that result's range is initialized.
59
60 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
61
62 * c-typeck.c (parser_build_unary_op): Fix formatting.
63
64 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
65
66 * c-decl.c (grokdeclarator): Remove errmsg and use of
67 targetm.invalid_return_type.
68 (grokparms): Remove errmsg and use of
69 targetm.invalid_parameter_type.
70
71 2016-05-13 Joseph Myers <joseph@codesourcery.com>
72
73 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
74 function return type.
75
76 2016-05-12 Marek Polacek <polacek@redhat.com>
77
78 PR c/70756
79 * c-decl.c (build_compound_literal): Pass LOC down to
80 c_incomplete_type_error.
81 * c-tree.h (require_complete_type): Adjust declaration.
82 (c_incomplete_type_error): Likewise.
83 * c-typeck.c (require_complete_type): Add location parameter, pass it
84 down to c_incomplete_type_error.
85 (c_incomplete_type_error): Add location parameter, pass it down to
86 error_at.
87 (build_component_ref): Pass location down to c_incomplete_type_error.
88 (default_conversion): Pass location down to require_complete_type.
89 (build_array_ref): Likewise.
90 (build_function_call_vec): Likewise.
91 (convert_arguments): Likewise.
92 (build_unary_op): Likewise.
93 (build_c_cast): Likewise.
94 (build_modify_expr): Likewise.
95 (convert_for_assignment): Likewise.
96 (c_finish_omp_clauses): Likewise.
97
98 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
99
100 PR c/43651
101 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
102 is enabled.
103 * c-errors.c (pedwarn_c90): Return true if warned.
104 * c-tree.h (pedwarn_c90): Change return type to bool.
105 (enum c_declspec_word): Add new enumerator cdw_atomic.
106
107 2016-05-11 Marek Polacek <polacek@redhat.com>
108
109 PR c++/71024
110 * c-decl.c (diagnose_mismatched_decls): Factor out code to
111 diagnose_mismatched_attributes and call it.
112
113 2016-05-10 Marek Polacek <polacek@redhat.com>
114
115 PR c/70255
116 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
117 on a declaration following the definition.
118
119 2016-05-05 Jakub Jelinek <jakub@redhat.com>
120
121 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
122 parse it through to c_parser_c99_block_statement.
123 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
124 caller.
125
126 2016-05-04 Marek Polacek <polacek@redhat.com>
127
128 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
129 OPT_Wdangling_else.
130
131 2016-05-04 Marek Polacek <polacek@redhat.com>
132
133 PR c/48778
134 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
135 for macro expansions.
136
137 2016-05-03 Marek Polacek <polacek@redhat.com>
138
139 PR c/70859
140 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
141 check_builtin_function_arguments.
142
143 2016-05-03 Richard Biener <rguenther@suse.de>
144
145 * Make-lang.in (cc1-checksum.c): For stage-final re-use
146 the checksum from the previous stage.
147
148 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
149
150 * c-parser.c (c_parser_oacc_all_clauses): Update call to
151 c_finish_omp_clauses.
152 (c_parser_omp_all_clauses): Likewise.
153 (c_parser_oacc_cache): Likewise.
154 (c_parser_oacc_loop): Likewise.
155 (omp_split_clauses): Likewise.
156 (c_parser_omp_declare_target): Likewise.
157 (c_parser_cilk_all_clauses): Likewise.
158 (c_parser_cilk_for): Likewise.
159 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
160 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
161
162 2016-05-02 Marek Polacek <polacek@redhat.com>
163
164 PR c/70851
165 * c-decl.c (grokdeclarator): Diagnose when array's size has an
166 incomplete type.
167
168 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
169
170 PR middle-end/70626
171 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
172 OACC_LOOP_CLAUSE_MASK.
173 (c_parser_oacc_kernels_parallel): Update call to
174 c_oacc_split_loop_clauses.
175
176 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
177
178 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
179 argument to build_modify_expr in two cases.
180
181 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
182
183 * c-parser.c (c_parser_postfix_expression_after_primary): Call
184 warn_for_memset instead of warning directly here.
185
186 2016-04-26 Marek Polacek <polacek@redhat.com>
187
188 PR c/67784
189 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
190 out of ...
191 (c_parser_for_statement): ... here.
192 (c_parser_if_statement): Use it.
193 (c_parser_switch_statement): Use it.
194 (c_parser_while_statement): Use it.
195
196 PR c/70791
197 * c-decl.c (pushdecl): Pass LOCUS down to warning.
198
199 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
200
201 PR c++/69363
202 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
203 instead of c_finish_cilk_clauses.
204 * c-tree.h (c_finish_omp_clauses): Add new default argument.
205 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
206 floating-point variables in the linear clause for Cilk Plus.
207
208 2016-04-18 Michael Matz <matz@suse.de>
209
210 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
211 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
212
213 2016-04-15 Marek Polacek <polacek@redhat.com>
214
215 PR c/70671
216 * c-typeck.c (build_unary_op): Pass location down to error and
217 warning call.
218
219 2016-04-15 Jakub Jelinek <jakub@redhat.com>
220
221 PR c/70436
222 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
223 where needed.
224 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
225 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
226 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
227 Adjust c_parser_pragma callers.
228 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
229 caller.
230 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
231 c_parser_statement.
232 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
233 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
234 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
235 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
236 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
237 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
238 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
239 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
240 down where needed.
241 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
242 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
243 calls.
244
245 2016-04-13 Marek Polacek <polacek@redhat.com>
246
247 PR c/70436
248 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
249 adjust callers.
250 (c_parser_statement): Likewise.
251 (c_parser_c99_block_statement): Likewise.
252 (c_parser_while_statement): Likewise.
253 (c_parser_for_statement): Likewise.
254 (c_parser_if_body): Don't set IF_P here.
255 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
256 about dangling else here.
257 * c-tree.h (c_finish_if_stmt): Adjust declaration.
258 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
259 warn about dangling else here.
260
261 2016-04-04 Marek Polacek <polacek@redhat.com>
262
263 PR c/70307
264 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
265
266 2016-03-31 Marek Polacek <polacek@redhat.com>
267
268 PR c/70297
269 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
270
271 2016-03-18 David Malcolm <dmalcolm@redhat.com>
272
273 PR c/70281
274 * c-parser.c (c_parser_postfix_expression): Set the source range
275 for uses of "__builtin_types_compatible_p".
276
277 2016-03-17 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/70280
280 * c-typeck.c (composite_type): Don't count void_list_node
281 into len, if the list is terminated by void_list_node, start
282 with void_list_node instead of NULL for newargs. Stop
283 at void_list_node.
284
285 2016-03-16 Marek Polacek <polacek@redhat.com>
286
287 PR c/70093
288 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
289 nested functions returning VM types.
290
291 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
292
293 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
294 when calling c_finish_omp_clauses.
295
296 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
297
298 PR c/69824
299 * c-decl.c (get_parm_info): Don't queue implicit function declarations
300 for later.
301
302 2016-03-04 Marek Polacek <polacek@redhat.com>
303
304 PR c/69798
305 * c-parser.c (c_parser_postfix_expression): Call
306 c_parser_cast_expression rather than c_parser_postfix_expression.
307
308 2016-03-01 Jakub Jelinek <jakub@redhat.com>
309
310 PR c/69796
311 PR c/69974
312 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
313 of incomplete decls to error_mark_node.
314
315 2016-02-24 Marek Polacek <polacek@redhat.com>
316
317 PR c/69819
318 * c-decl.c (finish_decl): Don't update the copy of the type of a
319 different decl type.
320
321 2016-02-23 Jakub Jelinek <jakub@redhat.com>
322
323 PR objc/69844
324 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
325 in id_kind reclassification.
326
327 2016-02-16 Jakub Jelinek <jakub@redhat.com>
328
329 PR c/69835
330 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
331
332 2016-02-16 James Norris <jnorris@codesourcery.com>
333
334 PR c/64748
335 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
336
337 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
338
339 * c-decl.c (build_null_declspecs): Zero the entire struct.
340
341 PR c/69522
342 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
343 callers changed. If nested_p is true, use it to call
344 finish_implicit_inits.
345 * c-tree.h (finish_implicit_inits): Declare.
346 * c-typeck.c (finish_implicit_inits): New function. Move code
347 from ...
348 (push_init_level): ... here.
349 (set_designator, process_init_element): Call finish_implicit_inits.
350
351 2016-02-11 Jakub Jelinek <jakub@redhat.com>
352
353 PR c/69768
354 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
355 arguments for -Waddress warning.
356
357 2016-02-04 Jakub Jelinek <jakub@redhat.com>
358
359 PR c/69669
360 * c-decl.c (finish_enum): When honoring mode attribute,
361 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
362
363 2016-01-29 Jakub Jelinek <jakub@redhat.com>
364
365 PR debug/69518
366 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
367 all type variants, not just TYPE_MAIN_VARIANT.
368
369 2016-01-27 Jakub Jelinek <jakub@redhat.com>
370
371 PR debug/66869
372 * c-decl.c (c_write_global_declarations_1): Warn with
373 warn_unused_function if static prototype without definition
374 is not C_DECL_USED.
375
376 2016-01-27 Marek Polacek <polacek@redhat.com>
377
378 PR c/68062
379 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
380 to unsigned, if needed. Add -Wsign-compare warning.
381
382 2016-01-26 Jakub Jelinek <jakub@redhat.com>
383
384 PR tree-optimization/69483
385 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
386
387 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
388
389 PR c/24293
390 * c-tree.h (incomplete_record_decls): Declare.
391 * c-parser.c (incomplete_record_decls): Define.
392 (c_parser_translation_unit): Iterate through incomplete_record_decls and
393 report error if any decl has zero size.
394 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
395 or enum type to incomplete_record_decls.
396
397 2016-01-14 Tom de Vries <tom@codesourcery.com>
398
399 PR tree-optimization/68773
400 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
401 set force_output.
402
403 2016-01-14 Marek Polacek <polacek@redhat.com>
404
405 PR c/69262
406 * c-decl.c (grokdeclarator): Provide more information for invalid
407 array declarations.
408
409 2016-01-06 David Malcolm <dmalcolm@redhat.com>
410
411 * c-parser.c (c_parser_unary_expression): For dereferences, build
412 a combined location before calling build_indirect_ref, so that
413 error reports cover the full range, manually updating the c_expr
414 src_range.
415
416 2016-01-06 Marek Polacek <polacek@redhat.com>
417
418 PR sanitizer/69099
419 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
420 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
421 NULL.
422
423 2016-01-04 Jakub Jelinek <jakub@redhat.com>
424
425 Update copyright years.
426
427 2016-01-04 Marek Polacek <polacek@redhat.com>
428
429 PR c/68908
430 * c-typeck.c (build_atomic_assign): Improve commentary. Add
431 optimization to use __atomic_fetch_* built-in if possible.
432
433 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
434
435 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
436 into...
437 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
438 all users.
439
440 2015-12-22 Marek Polacek <polacek@redhat.com>
441
442 PR c/69002
443 * c-typeck.c (build_component_ref): Warn when acessing elements of
444 atomic structures or unions.
445
446 2015-12-21 David Malcolm <dmalcolm@redhat.com>
447
448 * c-typeck.c: Include "gcc-rich-location.h".
449 (build_binary_op): In the two places that call binary_op_error,
450 create a gcc_rich_location and populate it with the location of
451 the binary op and its two operands.
452
453 2015-12-16 David Malcolm <dmalcolm@redhat.com>
454
455 * c-parser.c (c_parser_statement_after_labels): When calling
456 c_finish_return, Use the return expression's location if it has
457 one, falling back to the location of the first token within it.
458 * c-typeck.c (c_finish_return): When issuing warnings about
459 the incorrect presence/absence of a return value, issue a note
460 showing the declaration of the function.
461
462 2015-12-16 David Malcolm <dmalcolm@redhat.com>
463
464 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
465 to 4.
466 (c_parser_peek_nth_token): New function.
467 (c_parser_peek_conflict_marker): New function.
468 (c_parser_error): Detect conflict markers and report them as such.
469
470 2015-12-16 David Malcolm <dmalcolm@redhat.com>
471
472 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
473 to preserve range information for the primary expression
474 in the call to c_parser_postfix_expression_after_primary.
475
476 2015-12-16 David Malcolm <dmalcolm@redhat.com>
477
478 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
479 expression location, falling back on the first token location,
480 rather than always using the latter.
481
482 2015-12-16 Marek Polacek <polacek@redhat.com>
483
484 PR c/64637
485 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
486 available.
487
488 2015-12-15 Marek Polacek <polacek@redhat.com>
489
490 PR c/68907
491 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
492 artificial decl.
493
494 2015-12-08 David Malcolm <dmalcolm@redhat.com>
495
496 * c-parser.c (c_parser_alignof_expression): Capture location of
497 closing parenthesis (if any), or of end of unary expression, and
498 use it to build a src_range for the expression.
499
500 2015-12-08 David Malcolm <dmalcolm@redhat.com>
501
502 PR c/68757
503 * c-parser.c (c_parser_get_builtin_args): Add
504 "out_close_paren_loc" param, and write back to it.
505 (c_parser_postfix_expression): Capture the closing
506 parenthesis location for RID_CHOOSE_EXPR,
507 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
508 RID_BUILTIN_SHUFFLE and use it to set the source range
509 for such expressions; within RID_BUILTIN_COMPLEX set
510 the underlying location.
511
512 2015-12-07 Marek Polacek <polacek@redhat.com>
513
514 PR c/68668
515 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
516 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
517
518 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
519
520 * c-tree.h (c_build_va_arg): Adjust prototype.
521 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
522 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
523 parameter, adjust throughout and issue an error if EXPR is a component
524 with reverse storage order.
525
526 2015-12-02 Jason Merrill <jason@redhat.com>
527
528 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
529 (c_fully_fold_internal, decl_constant_value_for_optimization):
530 Move from c-common.c.
531 * c-tree.h: Declare decl_constant_value_for_optimization.
532 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
533
534 2015-12-02 Joseph Myers <joseph@codesourcery.com>
535
536 PR c/68162
537 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
538 following link from declarator to next declarator. Track original
539 qualified type and pass it to c_build_qualified_type.
540 * c-typeck.c (c_build_qualified_type): Add arguments
541 orig_qual_type and orig_qual_indirect.
542
543 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
544
545 * c-parser.c (c_parser_omp_clause_name)
546 (c_parser_oacc_all_clauses): Alphabetical sorting.
547
548 2015-12-02 Jakub Jelinek <jakub@redhat.com>
549
550 PR c/68533
551 * c-decl.c (get_parm_info): Use b->locus instead of input_location
552 for diagnostics.
553
554 2015-12-01 Julian Brown <julian@codesourcery.com>
555 Cesar Philippidis <cesar@codesourcery.com>
556 James Norris <James_Norris@mentor.com>
557
558 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
559 (c_parser_oacc_clause_use_device): New function.
560 (c_parser_oacc_all_clauses): Add use_device support.
561 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
562 (c_parser_oacc_host_data): New function.
563 (c_parser_omp_construct): Add host_data support.
564 * c-tree.h (c_finish_oacc_host_data): Add prototype.
565 * c-typeck.c (c_finish_oacc_host_data): New function.
566 (c_finish_omp_clauses): Add use_device support.
567
568 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
569
570 PR c/67106
571 * c-decl.c: Set TYPE_PACKED in variants.
572
573 2015-11-27 Martin Liska <mliska@suse.cz>
574
575 PR c++/68312
576 * c-array-notation.c (fix_builtin_array_notation_fn):
577 Use release_vec_vec instead of vec::release.
578 (build_array_notation_expr): Likewise.
579 (fix_conditional_array_notations_1): Likewise.
580 (fix_array_notation_expr): Likewise.
581 (fix_array_notation_call_expr): Likewise.
582
583 2015-11-27 Jakub Jelinek <jakub@redhat.com>
584
585 PR c/63326
586 * c-parser.c (c_parser_compound_statement_nostart): If
587 last_label is true, use pragma_stmt instead of pragma_compound
588 as second c_parser_pragma argument.
589 (c_parser_omp_ordered, c_parser_omp_target_update,
590 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
591 false as second argument to c_parser_skip_to_pragma_eol after
592 diagnosing standalone directives used in pragma_stmt context.
593
594 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
595
596 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
597 with "if (ENABLE_OFFLOADING)".
598
599 2015-11-23 David Malcolm <dmalcolm@redhat.com>
600
601 PR objc/68438
602 * c-parser.c (c_parser_postfix_expression): Set up source ranges
603 for various Objective-C constructs: Class.name syntax,
604 @selector(), @protocol(), @encode(), and [] message syntax.
605
606 2015-11-20 David Malcolm <dmalcolm@redhat.com>
607
608 PR 62314
609 * c-typeck.c (should_suggest_deref_p): New function.
610 (build_component_ref): Special-case POINTER_TYPE when
611 generating a "not a structure of union" error message, and
612 suggest a "->" rather than a ".", providing a fix-it hint.
613
614 2015-11-19 David Malcolm <dmalcolm@redhat.com>
615
616 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
617 candidate into a new function, find_closest_identifier.
618
619 2015-11-19 Marek Polacek <polacek@redhat.com>
620
621 PR c/68412
622 * c-typeck.c (parser_build_binary_op): Properly handle
623 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
624
625 2015-11-17 David Malcolm <dmalcolm@redhat.com>
626
627 * c-parser.c (set_c_expr_source_range): Bulletproof both
628 overloaded implementations against NULL expr->value.
629 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
630 values.
631 (c_parser_unary_expression): Likewise when handling addresses of
632 labels.
633 (c_parser_postfix_expression): Likewise for statement expressions,
634 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
635 __builtin_va_arg, and for __builtin_offset_of.
636 (c_parser_postfix_expression_after_paren_type): Initialize expr's
637 src_range using the range of the braced initializer.
638 (c_parser_transaction_expression): Set src_range for "ret" to a
639 sane pair of values.
640
641 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
642
643 * c-parser.c (c_finish_omp_declare_simd): Look for
644 "simd" attribute as well. Update error message.
645
646 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
647
648 * c-parser.c (c_parser_omp_declare_target): Adjust.
649
650 2015-11-14 Jakub Jelinek <jakub@redhat.com>
651
652 * c-typeck.c (c_finish_omp_clauses): Don't mark
653 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
654
655 2015-11-14 Marek Polacek <polacek@redhat.com>
656
657 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
658 * c-typeck.c: Likewise.
659
660 2015-11-13 David Malcolm <dmalcolm@redhat.com>
661
662 * c-decl.c (warn_defaults_to): Pass line_table to
663 rich_location ctor.
664 * c-errors.c (pedwarn_c99): Likewise.
665 (pedwarn_c90): Likewise.
666 * c-parser.c (set_c_expr_source_range): New functions.
667 (c_token::get_range): New method.
668 (c_token::get_finish): New method.
669 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
670 based on the range from the start of the LHS to the end of the
671 RHS.
672 (c_parser_conditional_expression): Likewise, based on the range
673 from the start of the cond.value to the end of exp2.value.
674 (c_parser_binary_expression): Call set_c_expr_source_range on
675 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
676 (c_parser_cast_expression): Call set_c_expr_source_range on ret
677 based on the cast_loc through to the end of the expr.
678 (c_parser_unary_expression): Likewise, based on the
679 op_loc through to the end of op.
680 (c_parser_sizeof_expression) Likewise, based on the start of the
681 sizeof token through to either the closing paren or the end of
682 expr.
683 (c_parser_postfix_expression): Likewise, using the token range,
684 or from the open paren through to the close paren for
685 parenthesized expressions.
686 (c_parser_postfix_expression_after_primary): Likewise, for
687 various kinds of expression.
688 * c-tree.h (struct c_expr): Add field "src_range".
689 (c_expr::get_start): New method.
690 (c_expr::get_finish): New method.
691 (set_c_expr_source_range): New decls.
692 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
693 on ret for prefix unary ops.
694 (parser_build_binary_op): Likewise, running from the start of
695 arg1.value through to the end of arg2.value.
696
697 2015-11-13 Marek Polacek <polacek@redhat.com>
698
699 PR c/68320
700 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
701
702 2015-11-13 David Malcolm <dmalcolm@redhat.com>
703
704 * c-typeck.c: Include spellcheck.h.
705 (lookup_field_fuzzy_find_candidates): New function.
706 (lookup_field_fuzzy): New function.
707 (build_component_ref): If the field was not found, try using
708 lookup_field_fuzzy and potentially offer a suggestion.
709
710 2015-11-12 James Norris <jnorris@codesourcery.com>
711 Joseph Myers <joseph@codesourcery.com>
712
713 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
714 (c_parser_omp_clause_name): Handle 'device_resident' clause.
715 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
716 and PRAGMA_OMP_CLAUSE_LINK.
717 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
718 and PRAGMA_OACC_CLAUSE_LINK.
719 (OACC_DECLARE_CLAUSE_MASK): New definition.
720 (c_parser_oacc_declare): New function.
721
722 2015-11-12 Marek Polacek <polacek@redhat.com>
723
724 PR c/67784
725 * c-parser.c (c_parser_for_statement): Reclassify the token in
726 a correct scope.
727
728 2015-11-11 Marek Polacek <polacek@redhat.com>
729
730 PR c/68107
731 PR c++/68266
732 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
733 checking the size of an array.
734
735 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
736
737 * c-array-notation.c: Remove unused header files.
738 * c-aux-info.c: Likewise.
739 * c-convert.c: Likewise.
740 * c-decl.c: Likewise.
741 * c-errors.c: Likewise.
742 * c-lang.c: Likewise.
743 * c-objc-common.c: Likewise.
744 * c-parser.c: Likewise.
745 * c-typeck.c: Likewise.
746 * gccspec.c: Likewise.
747
748 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
749 Cesar Philippidis <cesar@codesourcery.com>
750 James Norris <jnorris@codesourcery.com>
751 Julian Brown <julian@codesourcery.com>
752 Nathan Sidwell <nathan@codesourcery.com>
753
754 c/
755 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
756 routine arg.
757 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
758 (c_parser_pragma): Parse 'acc routine'.
759 (OACC_ROUTINE_CLAUSE_MARK): Define.
760 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
761
762 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
763
764 PR debug/67192
765 * c-typeck.c (c_finish_loop): For unconditional loops, set the
766 location of the backward-goto to the start of the loop body.
767
768 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
769
770 PR debug/67192
771 * c-parser.c (c_parser_while_statement): Finish the loop before
772 parsing ahead for misleading indentation.
773 (c_parser_for_statement): Likewise.
774
775 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
776
777 * c-decl.c (finish_struct): If the structure has reverse storage
778 order, rewrite the type of array fields with scalar component. Call
779 maybe_apply_pragma_scalar_storage_order on entry.
780 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
781 errors on bit-fields and reverse SSO here and not...
782 (c_mark_addressable): ...here.
783 (output_init_element): Adjust call to initializer_constant_valid_p.
784 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
785
786 2015-11-06 David Malcolm <dmalcolm@redhat.com>
787
788 * c-decl.c (warn_defaults_to): Update for change in signature
789 of diagnostic_set_info.
790 * c-errors.c (pedwarn_c99): Likewise.
791 (pedwarn_c90): Likewise.
792 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
793 for textinfo::set_location.
794
795 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
796 Thomas Schwinge <thomas@codesourcery.com>
797 James Norris <jnorris@codesourcery.com>
798
799 * c-parser.c (c_parser_omp_clause_name): Add support for
800 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
801 (c_parser_omp_clause_default): Add is_oacc argument. Handle
802 default(none) in OpenACC.
803 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
804 arguments.
805 (c_parser_oacc_clause_tile): New function.
806 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
807 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
808 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
809 TILE}.
810 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
811 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
812 FIRSTPRIVATE}.
813 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
814 (c_parser_oacc_update): Update the error message for missing clauses.
815 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
816 and OMP_CLAUSE_INDEPENDENT.
817
818 2015-11-05 Marek Polacek <polacek@redhat.com>
819
820 PR c/68090
821 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
822 deal with pre-evaluation on invalid types.
823
824 2015-11-05 Jakub Jelinek <jakub@redhat.com>
825 Ilya Verbin <ilya.verbin@intel.com>
826
827 * c-parser.c: Include context.h and gimple-expr.h.
828 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
829 monotonic together with nonmonotonic.
830 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
831 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
832 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
833 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
834 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
835 expressions on combined target teams before the target.
836 (c_parser_omp_declare_target): If decl has "omp declare target" or
837 "omp declare target link" attribute, and cgraph or varpool node already
838 exists, then set corresponding flags. Call c_finish_omp_clauses
839 in the parenthesized extended-list syntax case.
840 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
841 declare target.
842 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
843 on OMP_CLAUSE_REDUCTION array sections.
844 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
845 into the constant offset, or for variable low-bound using
846 POINTER_PLUS_EXPR. For structure element based array sections use
847 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
848 (c_finish_omp_clauses): Drop generic_field_head, structure
849 elements are now always mapped even as array section bases,
850 diagnose same var in data sharing and mapping clauses. Diagnose if
851 linear step on declare simd is neither a constant nor a uniform
852 parameter. Look through POINTER_PLUS_EXPR for array section
853 reductions. Diagnose the same var or function appearing multiple
854 times on the same directive. Fix up wording for the to clause if t
855 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
856 modifier on kinds other than dynamic or guided or nonmonotonic
857 modifier together with ordered clause.
858
859 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
860 Chung-Lin Tang <cltang@codesourcery.com>
861
862 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
863
864 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
865
866 * c-array-notation.c: Reorder #include's and remove duplicates.
867 * c-aux-info.c: Likewise.
868 * c-convert.c: Likewise.
869 * c-decl.c: Likewise.
870 * c-errors.c: Likewise.
871 * c-lang.c: Likewise.
872 * c-objc-common.c: Likewise.
873 * c-parser.c: Likewise.
874 * c-typeck.c: Likewise.
875
876 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
877
878 PR debug/66068
879 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
880 after calling build_qualified_type.
881
882 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
883 Thomas Schwinge <thomas@codesourcery.com>
884 James Norris <jnorris@codesourcery.com>
885 Joseph Myers <joseph@codesourcery.com>
886 Julian Brown <julian@codesourcery.com>
887 Bernd Schmidt <bschmidt@redhat.com>
888
889 * c-parser.c (c_parser_oacc_shape_clause): New.
890 (c_parser_oacc_simple_clause): New.
891 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
892 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
893
894 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
895 James Norris <jnorris@codesourcery.com>
896 Cesar Philippidis <cesar@codesourcery.com>
897
898 PR c/64765
899 PR c/64880
900 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
901 parameters, and handle these. Adjust all users.
902 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
903 into...
904 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
905 all users.
906 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
907 declare functions.
908 (c_finish_omp_construct): Declare function.
909 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
910 Merge functions into...
911 (c_finish_omp_construct): ... this new function.
912
913 2015-10-22 Richard Biener <rguenther@suse.de>
914
915 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
916 before folding a MINUS_EXPR.
917
918 2015-10-21 Marek Polacek <polacek@redhat.com>
919
920 PR c/68024
921 * c-decl.c (start_function): Warn about vararg functions without
922 a prototype.
923
924 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
925
926 * c-typeck.c (build_conditional_expr): Use boolean vector
927 type for vector comparison.
928 (build_vec_cmp): New.
929 (build_binary_op): Use build_vec_cmp for comparison.
930
931 2015-10-20 Marek Polacek <polacek@redhat.com>
932
933 * c-parser.c (is_cilkplus_vector_p): Don't define here.
934
935 2015-10-20 Marek Polacek <polacek@redhat.com>
936
937 PR c/67964
938 * c-parser.c (c_parser_attributes): Break out of the loop if the
939 token after an attribute isn't a comma.
940
941 2015-10-13 Jakub Jelinek <jakub@redhat.com>
942 Aldy Hernandez <aldyh@redhat.com>
943
944 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
945 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
946 (c_parser_omp_variable_list): Handle structure elements for
947 map, to and from clauses. Handle array sections in reduction
948 clause. Formatting fixes.
949 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
950 if clause modifiers.
951 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
952 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
953 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
954 c_parser_omp_clause_is_device_ptr): New functions.
955 (c_parser_omp_clause_ordered): Parse optional parameter.
956 (c_parser_omp_clause_reduction): Handle array reductions.
957 (c_parser_omp_clause_schedule): Parse optional simd modifier.
958 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
959 functions.
960 (c_parser_omp_clause_linear): Parse linear clause modifiers.
961 (c_parser_omp_clause_depend_sink): New function.
962 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
963 (c_parser_omp_clause_map): Parse release/delete map kinds and
964 optional always modifier.
965 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
966 and c_finish_omp_clauses callers.
967 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
968 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
969 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
970 (OMP_CRITICAL_CLAUSE_MASK): Define.
971 (c_parser_omp_critical): Parse critical clauses.
972 (c_parser_omp_for_loop): Handle doacross loops, adjust
973 c_finish_omp_for and c_finish_omp_clauses callers.
974 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
975 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
976 (OMP_FOR_CLAUSE_MASK): Add linear clause.
977 (c_parser_omp_for): Disallow ordered clause when combined with
978 distribute. Disallow linear clause when combined with distribute
979 and not combined with simd.
980 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
981 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
982 parse clauses and if depend clause is found, don't parse a body.
983 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
984 Allow target parallel without for after it.
985 (OMP_TASK_CLAUSE_MASK): Add priority clause.
986 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
987 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
988 invalid kinds.
989 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
990 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
991 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
992 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
993 functions.
994 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
995 defaultmap and is_device_ptr clauses.
996 (c_parser_omp_target): Parse target parallel and target simd. Set
997 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
998 and target exit data. Diagnose invalid map kinds.
999 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1000 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1001 construct.
1002 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1003 &omp_priv.
1004 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1005 (c_parser_omp_taskloop): New function.
1006 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1007 handle PRAGMA_OMP_TASKLOOP.
1008 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1009 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1010 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1011 Add IS_OMP argument, handle structure element bases, diagnose
1012 bitfields, pass IS_OMP recursively, diagnose known zero length
1013 array sections in depend clauses, handle array sections in reduction
1014 clause, diagnose negative length even for pointers.
1015 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1016 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1017 array sections in reduction clause, set
1018 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1019 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1020 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1021 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1022
1023 2015-10-06 Marek Polacek <polacek@redhat.com>
1024
1025 * c-parser.c (c_parser_statement_after_labels): Use
1026 protected_set_expr_location.
1027 (c_parser_omp_clause_num_gangs): Likewise.
1028 (c_parser_omp_clause_num_threads): Likewise.
1029 (c_parser_omp_clause_num_workers): Likewise.
1030 (c_parser_omp_clause_vector_length): Likewise.
1031 (c_parser_omp_clause_num_teams): Likewise.
1032 (c_parser_omp_clause_thread_limit): Likewise.
1033 * c-typeck.c (build_c_cast): Likewise.
1034 (c_cast_expr): Likewise.
1035
1036 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1037
1038 * c-typeck.c (c_tree_equal): Use real_equal instead of
1039 REAL_VALUES_EQUAL.
1040
1041 2015-10-04 Jason Merrill <jason@redhat.com>
1042
1043 * c-parser.c (c_lex_one_token): Handle @synchronized.
1044 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1045 can change whether the function is transaction_safe.
1046
1047 2015-10-02 Marek Polacek <polacek@redhat.com>
1048
1049 PR c/67730
1050 * c-typeck.c (convert_for_assignment): Use the expansion point
1051 location throughout.
1052
1053 2015-10-02 Marek Polacek <polacek@redhat.com>
1054
1055 PR c/64249
1056 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1057 and pass it down to c_parser_if_statement.
1058 (c_parser_else_body): Add CHAIN parameter and pass it down to
1059 c_parser_statement_after_labels.
1060 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1061 duplicated if-else-if conditions.
1062
1063 2015-10-01 Marek Polacek <polacek@redhat.com>
1064
1065 * c-typeck.c (convert_for_assignment): Improve commentary.
1066
1067 2015-09-30 Marek Polacek <polacek@redhat.com>
1068
1069 PR c/67730
1070 * c-typeck.c (c_finish_return): Use the expansion point location for
1071 certain "return with value" warnings.
1072
1073 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1074
1075 * c-parser.c (pragma_lex): Add loc argument.
1076
1077 2015-09-15 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/67580
1080 * c-decl.c (tag_exists_p): New function.
1081 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1082 struct/union/enum keywords are missing.
1083 * c-tree.h (tag_exists_p): Declare.
1084
1085 2015-09-15 Marek Polacek <polacek@redhat.com>
1086
1087 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1088 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1089 Return NULL_TREE instead of 0.
1090 (lookup_name): Return NULL_TREE instead of 0.
1091 (lookup_name_in_scope): Likewise.
1092 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1093 (parser_xref_tag): Use false instead of 0.
1094 (start_struct): Use true instead of 1.
1095 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1096
1097 2015-09-14 Marek Polacek <polacek@redhat.com>
1098
1099 * c-typeck.c (set_nonincremental_init_from_string): Use
1100 HOST_WIDE_INT_M1U when shifting a negative value.
1101
1102 2015-09-09 Mark Wielaard <mjw@redhat.com>
1103
1104 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1105 parm against NULL.
1106
1107 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1108
1109 PR c/67502
1110 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1111 into OMP_FOR_PRE_BODY rather than before the loop.
1112
1113 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1114
1115 PR c/67501
1116 * c-parser.c (c_parser_oacc_all_clauses,
1117 c_parser_omp_all_clauses): Remove invalid clause from
1118 list of clauses even if parser->error is set.
1119
1120 PR c/67500
1121 * c-parser.c (c_parser_omp_clause_aligned,
1122 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1123 test for errors.
1124 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1125 error_mark_node.
1126
1127 PR c/67495
1128 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1129 instead of c_parser_unary_expression. If the result is !lvalue_p,
1130 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1131
1132 2015-09-04 Marek Polacek <polacek@redhat.com>
1133
1134 PR sanitizer/67279
1135 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1136
1137 2015-09-03 Martin Sebor <msebor@redhat.com>
1138
1139 PR c/66516
1140 * c-typeck.c (convert_arguments, parser_build_unary_op,
1141 build_conditional_expr, c_cast_expr, convert_for_assignment,
1142 build_binary_op, _objc_common_truthvalue_conversion): Call
1143 reject_gcc_builtin.
1144 (c_decl_implicit): Define.
1145
1146 2015-09-02 Marek Polacek <polacek@redhat.com>
1147
1148 PR c/67432
1149 * c-parser.c (c_parser_enum_specifier): Give a better error for
1150 an empty enum.
1151
1152 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1153
1154 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1155
1156 2015-08-12 Marek Polacek <polacek@redhat.com>
1157
1158 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1159 LOC to it.
1160
1161 2015-08-03 Marek Polacek <polacek@redhat.com>
1162
1163 PR c/67088
1164 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1165 Use it.
1166 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1167
1168 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1169
1170 * c-parser.c (c_parser_if_body): Take token_indent_info
1171 argument. Call warn_for_misleading_indentation even when the
1172 body is a semicolon. Extract token_indent_infos corresponding
1173 to the guard, body and next tokens. Adjust call to
1174 warn_for_misleading_indentation accordingly.
1175 (c_parser_else_body): Likewise.
1176 (c_parser_if_statement): Likewise.
1177 (c_parser_while_statement): Likewise.
1178 (c_parser_for_statement): Likewise.
1179
1180 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1181 Manuel López-Ibáñez <manu@gcc.gnu.org>
1182
1183 * c-decl.c (get_parm_info): Remove static var. Update warning
1184 message.
1185
1186 2015-07-27 Marek Polacek <polacek@redhat.com>
1187
1188 PR c++/66555
1189 PR c/54979
1190 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1191
1192 2015-07-20 Marek Polacek <polacek@redhat.com>
1193
1194 PR c++/55095
1195 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1196 (build_binary_op): Warn about left shift overflows.
1197
1198 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1199
1200 * c-array-notation.c: Adjust includes for flags.h changes.
1201 * c-objc-common.c: Likewise.
1202
1203 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1204
1205 * c-array-notation.c: Adjust includes.
1206 * c-aux-info.c: Likewise.
1207 * c-convert.c: Likewise.
1208 * c-decl.c: Likewise.
1209 * c-errors.c: Likewise.
1210 * c-lang.c: Likewise.
1211 * c-objc-common.c: Likewise.
1212 * c-parser.c: Likewise.
1213 * c-typeck.c: Likewise.
1214
1215 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1216
1217 PR fortran/66605
1218 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1219
1220 2015-06-29 Marek Polacek <polacek@redhat.com>
1221
1222 PR c/66322
1223 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1224 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1225 about -Wswitch-bool here.
1226 (do_case): Update c_add_case_label call.
1227 (c_finish_case): Update c_do_switch_warnings call.
1228
1229 2015-06-27 Marek Polacek <polacek@redhat.com>
1230
1231 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1232
1233 2015-06-26 Marek Polacek <polacek@redhat.com>
1234
1235 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1236 INDIRECT_REF_P.
1237 * c-typeck.c (array_to_pointer_conversion): Likewise.
1238 (build_unary_op): Likewise.
1239 (c_finish_return): Likewise.
1240
1241 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1242
1243 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1244 * c-parser.c: Likewise.
1245
1246 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1247
1248 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1249 instead of pointer_hash.
1250 (detect_field_duplicates): Likewise.
1251
1252 2015-06-25 Marek Polacek <polacek@redhat.com>
1253
1254 * c-array-notation.c: Use VAR_P throughout.
1255 * c-decl.c: Likewise.
1256 * c-objc-common.c: Likewise.
1257 * c-parser.c: Likewise.
1258 * c-typeck.c: Likewise.
1259
1260 2015-06-25 Marek Polacek <polacek@redhat.com>
1261
1262 * c-decl.c: Use is_global_var throughout.
1263 * c-parser.c: Likewise.
1264 * c-typeck.c: Likewise.
1265
1266 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1267
1268 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1269 * c-aux-info.c: Likewise.
1270 * c-convert.c: Likewise.
1271 * c-decl.c: Likewise.
1272 * c-errors.c: Likewise.
1273 * c-lang.c: Likewise.
1274 * c-objc-common.c: Likewise.
1275 * c-parser.c: Likewise.
1276 * c-typeck.c: Likewise.
1277
1278 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1279
1280 PR middle-end/66325
1281 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1282 variants.
1283
1284 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1285
1286 * c-decl.c (pop_scope): Register the main translation unit
1287 through the new debug hook.
1288
1289 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1290
1291 * c-array-notation.c : Adjust include files.
1292 * c-aux-info.c : Likewise.
1293 * c-convert.c : Likewise.
1294 * c-decl.c : Likewise.
1295 * c-errors.c : Likewise.
1296 * c-lang.c : Likewise.
1297 * c-lang.h : Likewise.
1298 * c-objc-common.c : Likewise.
1299 * c-parser.c : Likewise.
1300 * c-typeck.c : Likewise.
1301
1302 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1303
1304 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1305 immediately clobber it.
1306 (c_write_global_declarations_1): Remove call to
1307 check_global_declaration_1.
1308 (c_write_global_declarations_2): Remove.
1309 (c_write_final_cleanups): Rename from c_write_global_declarations.
1310 Remove call to finalize_compilation_unit.
1311 Remove calls to debugging hooks.
1312 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1313 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1314 * c-tree.h: Remove c_write_global_declarations.
1315
1316 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1317
1318 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1319 * c-aux-info.c: Likewise.
1320 * c-convert.c: Likewise.
1321 * c-decl.c: Likewise.
1322 * c-errors.c: Likewise.
1323 * c-lang.c: Likewise.
1324 * c-objc-common.c: Likewise.
1325 * c-parser.c: Likewise.
1326 * c-typeck.c: Likewise.
1327
1328 2015-06-04 Marek Polacek <polacek@redhat.com>
1329
1330 PR c/66341
1331 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1332 it is a lvalue.
1333
1334 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1335
1336 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1337 Warn for empty struct.
1338 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1339
1340 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1341
1342 * c-decl.c (start_function): Call plugin before parsing.
1343 (finish_function): Call plugin after parsing.
1344
1345 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1346
1347 PR c/49551
1348 * c-decl.c (merge_decls): Merge DECL_COMMON.
1349
1350 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1351
1352 * Make-lang.in (check_gcc_pallelize): Define.
1353
1354 2015-05-22 Marek Polacek <polacek@redhat.com>
1355
1356 PR c/47043
1357 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1358 attributes.
1359
1360 2015-05-21 Marek Polacek <polacek@redhat.com>
1361
1362 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1363 DECL_BUILT_IN.
1364
1365 2015-05-20 Marek Polacek <polacek@redhat.com>
1366
1367 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1368 * c-typeck.c: Likewise.
1369
1370 2015-05-19 Marek Polacek <polacek@redhat.com>
1371
1372 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1373
1374 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR middle-end/66199
1377 * c-parser.c (c_parser_omp_for_loop): Don't add
1378 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1379 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1380 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1381 constructs.
1382
1383 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1384
1385 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1386 swaps.
1387
1388 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1389
1390 PR fortran/44054
1391 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1392 accessor function.
1393
1394 2015-05-14 Marek Polacek <polacek@redhat.com>
1395
1396 PR c/66066
1397 PR c/66127
1398 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1399 rather than with 0.
1400
1401 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1402
1403 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1404 to add a call to warn_for_misleading_indentation.
1405 (c_parser_else_body): Likewise, adding param "else_loc".
1406 (c_parser_if_statement): Check for misleading indentation.
1407 (c_parser_while_statement): Likewise.
1408 (c_parser_for_statement): Likewise.
1409
1410 2015-05-08 Marek Polacek <polacek@redhat.com>
1411
1412 PR c/64918
1413 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1414 (output_init_element): Likewise.
1415
1416 2015-05-07 Marek Polacek <polacek@redhat.com>
1417
1418 PR c/65179
1419 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1420 value.
1421
1422 2015-04-30 Marek Polacek <polacek@redhat.com>
1423
1424 * c-typeck.c (set_init_label): Call error_at instead of error and
1425 pass LOC to it.
1426
1427 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1428 the type of a decl.
1429
1430 * c-typeck.c (c_build_va_arg): Clarify the error message.
1431
1432 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1433
1434 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1435 OMP_STANDALONE_CLAUSES.
1436
1437 2015-04-28 Marek Polacek <polacek@redhat.com>
1438
1439 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1440
1441 2015-04-28 Marek Polacek <polacek@redhat.com>
1442
1443 PR c/65901
1444 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1445
1446 2015-04-25 Marek Polacek <polacek@redhat.com>
1447
1448 PR c/52085
1449 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1450 attribute.
1451
1452 2015-04-23 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/65345
1455 * c-decl.c (set_labels_context_r): New function.
1456 (store_parm_decls): Call it via walk_tree_without_duplicates.
1457 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1458 instead of create_tmp_var. Build TARGET_EXPR instead of
1459 COMPOUND_EXPR.
1460 (build_atomic_assign): Use create_tmp_var_raw instead of
1461 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1462
1463 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1464
1465 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1466 (c_parser_omp_target_update): Add missed %> to error_at ().
1467
1468 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1469
1470 PR target/55143
1471 * c-decl.c (c_default_pointer_mode): Remove definition.
1472 * c-tree.h (c_default_pointer_mode): Remove declaration.
1473
1474 2015-03-27 Tobias Burnus <burnus@net-b.de>
1475
1476 PR c/65586
1477 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1478 error out.
1479 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1480 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1481 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1482
1483 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1484
1485 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1486 attribute for DECL_EXTERNAL VAR_DECLs.
1487
1488 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1489
1490 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1491 argument.
1492
1493 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/65120
1496 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1497 before preparing arguments to warn_logical_not_parentheses.
1498
1499 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1500
1501 PR c/65120
1502 * c-typeck.c (parser_build_binary_op): Don't warn for
1503 !!x == y or !b == y where b is _Bool.
1504
1505 2015-03-09 Marek Polacek <polacek@redhat.com>
1506
1507 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1508 * c-decl.c (grokdeclarator): Likewise.
1509 * c-typeck.c (build_binary_op): Likewise.
1510
1511 2015-02-27 Marek Polacek <polacek@redhat.com>
1512
1513 PR c/65228
1514 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1515
1516 2015-02-14 Marek Polacek <polacek@redhat.com>
1517
1518 PR c/64768
1519 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1520 declared through a typedef name.
1521
1522 2015-02-13 Marek Polacek <polacek@redhat.com>
1523
1524 PR c/65050
1525 * c-decl.c (grokdeclarator): Print also the type when giving
1526 the error message about array's incomplete element type.
1527
1528 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1529
1530 PR c/64824
1531 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1532 check in the POP macro.
1533
1534 2015-02-09 Marek Polacek <polacek@redhat.com>
1535
1536 PR c/64856
1537 * c-typeck.c (process_init_element): Don't always wrap
1538 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1539 initializing a range of elements.
1540
1541 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1542
1543 PR c/64824
1544 PR c/64868
1545 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1546
1547 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1548
1549 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1550 processing enum declaration.
1551
1552 2015-01-29 Marek Polacek <polacek@redhat.com>
1553
1554 PR c/64709
1555 * c-typeck.c (pop_init_level): If constructor_elements has
1556 exactly one element with integer_zerop value, set constructor_zeroinit
1557 to 1. Remove braces around warning_init call.
1558
1559 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1560
1561 PR c/64766
1562 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1563 of FUNCTION_DECLs with error_mark_node.
1564
1565 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1566
1567 PR c/64778
1568 * c-typeck.c (convert_arguments): Return -1 if there are
1569 error_args, even if we've diagnosed too many arguments.
1570
1571 2015-01-21 Richard Biener <rguenther@suse.de>
1572
1573 PR middle-end/64313
1574 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1575 for builtins the user declared correctly.
1576
1577 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1578 Bernd Schmidt <bernds@codesourcery.com>
1579 Cesar Philippidis <cesar@codesourcery.com>
1580 James Norris <jnorris@codesourcery.com>
1581 Jakub Jelinek <jakub@redhat.com>
1582 Ilmir Usmanov <i.usmanov@samsung.com>
1583
1584 * c-parser.c: Include "gomp-constants.h".
1585 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1586 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1587 Use OMP_CLAUSE_SET_MAP_KIND.
1588 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1589 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1590 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1591 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1592 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1593 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1594 "copyout", "create", "delete", "deviceptr", "gang", "host",
1595 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1596 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1597 "present_or_create", "pcreate", "seq", "self", "vector",
1598 "vector_length", "wait", "worker".
1599 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1600 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1601 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1602 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1603 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1604 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1605 (c_parser_oacc_data_clause_deviceptr)
1606 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1607 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1608 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1609 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1610 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1611 (c_parser_oacc_parallel, c_parser_oacc_update)
1612 (c_parser_oacc_wait): New functions.
1613 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1614 (c_finish_oacc_data): New prototypes.
1615 * c-typeck.c: Include "gomp-constants.h".
1616 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1617 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1618 OMP_CLAUSE_SET_MAP_KIND.
1619 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1620 (c_finish_oacc_data): New functions.
1621 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1622 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1623 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1624 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1625 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1626 GOMP_MAP_FORCE_DEVICEPTR.
1627
1628 2015-01-09 Michael Collison <michael.collison@linaro.org>
1629
1630 * c-array-notation.c: Include hash-set.h, machmode.h,
1631 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1632 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1633 * c-aux-info.c: Ditto.
1634 * c-convert.c: Ditto.
1635 * c-decl.c: Ditto.
1636 * c-errors.c: Ditto.
1637 * c-lang.c: Dittoxs.
1638 * c-objc-common.c: Ditto.
1639 * c-parser.c: Ditto.
1640 * c-typeck.c: Include hash-set.h, machmode.h,
1641 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1642 fold-const.h, wide-int.h, inchash.h, real.h and
1643 fixed-value.h due to flattening of tree.h.
1644
1645 2015-01-07 Marek Polacek <polacek@redhat.com>
1646
1647 PR c/64417
1648 * c-typeck.c (process_init_element): Disallow initialization of
1649 a flexible array member with a string constant if the structure
1650 is in an array.
1651
1652 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR sanitizer/64344
1655 * c-typeck.c (convert_for_assignment, c_finish_return): For
1656 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1657 types also set in_late_binary_op around convert call.
1658 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1659 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1660 result on expr as last argument to ubsan_instrument_float_cast,
1661 if in_late_binary_op, don't use c_save_expr but save_expr.
1662
1663 Update copyright years.
1664
1665 2015-01-05 Marek Polacek <polacek@redhat.com>
1666
1667 PR c/64423
1668 * c-typeck.c (build_array_ref): Pass loc down to
1669 warn_array_subscript_with_type_char.
1670
1671 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1672
1673 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1674 (common-pointer-type): For pointers to arrays take qualifiers from
1675 element type.
1676 (build_conditional_expr): Add warnings for lost qualifiers.
1677 (comp-target-types): Allow pointers to arrays with different qualifiers.
1678 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1679 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1680 to PEDWARN_FOR_QUALIFIERS.
1681
1682 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1683
1684 PR sanitizer/64289
1685 * c-convert.c: Include ubsan.h.
1686 (convert): For real -> integral casts and
1687 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1688 instead instrument the float cast directly.
1689
1690 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1691
1692 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1693 c_finish_stmt_expr): Remove NULL last argument from
1694 create_tmp_var_raw and create_tmp_var calls.
1695 * c-array-notation.c (fix_builtin_array_notation_fn,
1696 build_array_notation_expr, fix_conditional_array_notations_1,
1697 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1698
1699 2014-11-28 Marek Polacek <polacek@redhat.com>
1700
1701 PR c/63862
1702 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1703 convert the right operand to integer type.
1704
1705 2014-11-25 Marek Polacek <polacek@redhat.com>
1706
1707 PR c/63877
1708 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1709 for inline functions.
1710
1711 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR target/63764
1714 * c-typeck.c (build_array_ref): Adjust
1715 convert_vector_to_pointer_for_subscript caller. If it returns true,
1716 call non_lvalue_loc on the result.
1717
1718 2014-11-11 Richard Biener <rguenther@suse.de>
1719
1720 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1721 to true.
1722
1723 2014-11-10 Andi Kleen <ak@linux.intel.com>
1724
1725 PR c/60804
1726 * c-parser.c (c_parser_statement_after_labels): Call
1727 check_no_cilk.
1728 (c_parser_if_statement): Dito.
1729 (c_parser_switch_statement): Dito.
1730 (c_parser_while_statement): Dito.
1731 (c_parser_do_statement): Dito.
1732 (c_parser_for_statement): Dito.
1733 * c-typeck.c (c_finish_loop): Dito.
1734
1735 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1736
1737 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1738 OPT_Wshift_count_overflow in the warnings.
1739
1740 2014-10-30 Marek Polacek <polacek@redhat.com>
1741
1742 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1743 print the stripped version as well, if they're not the same.
1744
1745 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1746
1747 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1748 machine_mode.
1749
1750 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1751
1752 * c-decl.c: Adjust include files.
1753 * c-parser.c: Ditto.
1754
1755 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1756 Tom Tromey <tromey@redhat.com>
1757
1758 * c-tree.h (enum c_oracle_request): New.
1759 (c_binding_oracle_function): New typedef.
1760 (c_binding_oracle, c_pushtag, c_bind): Declare.
1761 * c-decl.c (c_binding_oracle): New global.
1762 (I_SYMBOL_CHECKED): New macro.
1763 (i_symbol_binding): New function.
1764 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1765 (I_TAG_CHECKED): New macro.
1766 (i_tag_binding): New function.
1767 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1768 (I_LABEL_CHECKED): New macro.
1769 (i_label_binding): New function.
1770 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1771 (c_print_identifier): Save and restore c_binding_oracle.
1772 (c_pushtag, c_bind): New functions.
1773
1774 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1775
1776 * c-typeck.c: Adjust include files.
1777
1778 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1779
1780 PR c++/53061
1781 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1782 initialization here...
1783 (c_initialize_diagnostics): ... but here. Set defaults after
1784 building pretty-printer.
1785
1786 2014-10-23 Marek Polacek <polacek@redhat.com>
1787
1788 PR c/63626
1789 * c-decl.c (pop_scope): Don't print warning in external_scope.
1790
1791 2014-10-19 Marek Polacek <polacek@redhat.com>
1792
1793 PR c/63567
1794 * c-typeck.c (output_init_element): Allow initializing objects with
1795 static storage duration with compound literals even in C99 and add
1796 pedwarn for it.
1797
1798 2014-10-17 Marek Polacek <polacek@redhat.com>
1799
1800 PR c/63567
1801 * c-typeck.c (digest_init): Allow initializing objects with static
1802 storage duration with compound literals even in C99 and add pedwarn
1803 for it.
1804
1805 2014-10-17 Marek Polacek <polacek@redhat.com>
1806
1807 PR c/63543
1808 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1809 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1810 error multiple times. Print the type.
1811
1812 2014-10-17 Marek Polacek <polacek@redhat.com>
1813
1814 PR c/63549
1815 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1816 type.
1817
1818 2014-10-17 Marek Polacek <polacek@redhat.com>
1819
1820 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1821 (start_function): Use OPT_Wimplicit_int instead of 0.
1822 (store_parm_decls_oldstyle): Likewise.
1823
1824 2014-10-17 Alan Modra <amodra@gmail.com>
1825
1826 PR middle-end/61848
1827 * c-decl.c (merge_decls): Don't merge section name or tls model
1828 to newdecl symtab node, instead merge to olddecl. Override
1829 existing olddecl section name. Set tls_model for all thread-local
1830 vars, not just OMP thread-private ones. Remove incorrect comment.
1831
1832 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1833
1834 * c-decl.c: Adjust include files.
1835
1836 2014-10-14 DJ Delorie <dj@redhat.com>
1837
1838 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1839 (c_token_starts_typename): Check all __intN, not just __int128.
1840 (c_token_starts_declspecs): Likewise.
1841 (c_parser_declspecs): Likewise.
1842 (c_parser_attribute_any_word): Likewise.
1843 (c_parser_objc_selector): Likewise.
1844 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1845 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1846 is specified.
1847 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1848 __int128.
1849 (finish_declspecs): Likewise.
1850
1851 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1852
1853 * c-parser.c (c_parser_all_labels): New function to replace
1854 the duplicate code.
1855 (c_parser_statement): Call the new function.
1856
1857 2014-10-09 Marek Polacek <polacek@redhat.com>
1858
1859 PR c/63480
1860 * c-typeck.c (pop_init_level): Don't warn about initializing
1861 with { }.
1862
1863 2014-10-07 Marek Polacek <polacek@redhat.com>
1864
1865 PR c/59717
1866 * c-decl.c (header_for_builtin_fn): New function.
1867 (implicitly_declare): Suggest which header to include.
1868
1869 2014-10-07 Marek Polacek <polacek@redhat.com>
1870
1871 * c-convert.c (convert): Use error_operand_p.
1872 * c-typeck.c (require_complete_type): Likewise.
1873 (really_atomic_lvalue): Likewise.
1874 (digest_init): Likewise.
1875 (handle_omp_array_sections_1): Likewise.
1876
1877 2014-10-03 Marek Polacek <polacek@redhat.com>
1878
1879 PR c/63453
1880 * c-decl.c (pop_scope): Don't warn about "inline function declared
1881 but never defined" for functions marked with gnu_inline attribute.
1882
1883 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1884
1885 PR c++/63249
1886 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1887 on low_bound and length.
1888
1889 2014-09-24 Marek Polacek <polacek@redhat.com>
1890
1891 PR c/61405
1892 PR c/53874
1893 * c-parser.c: Don't define CPP_KEYWORD.
1894 (c_parser_switch_statement): Pass original type to c_finish_case.
1895 * c-tree.h (c_finish_case): Update declaration.
1896 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1897 conditionally to c_do_switch_warnings.
1898
1899 2014-09-03 Marek Polacek <polacek@redhat.com>
1900
1901 PR c/62024
1902 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1903 conversions.
1904
1905 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1906 Balaji V. Iyer <balaji.v.iyer@intel.com>
1907 Igor Zamyatin <igor.zamyatin@intel.com>
1908
1909 * c-parser.c (c_parser_cilk_for): New function.
1910 (c_parser_cilk_grainsize): Likewise.
1911 (c_get_temp_regvar): Likewise.
1912 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1913 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1914 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1915 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1916 case.
1917
1918 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1919
1920 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1921 with using HOST_WIDE_INT without truncation to 'int'
1922
1923 2014-08-22 Marek Polacek <polacek@redhat.com>
1924
1925 PR c++/62199
1926 * c-typeck.c (parser_build_binary_op): Adjust call to
1927 warn_logical_not_parentheses.
1928
1929 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1930
1931 PR other/62008
1932 * c-parser.c (c_parser_array_notation): Check for correct
1933 type of an array added.
1934
1935 2014-08-19 Marek Polacek <polacek@redhat.com>
1936
1937 PR c++/62153
1938 * c-typeck.c (build_binary_op): If either operand of a comparison
1939 is a boolean expression, call maybe_warn_bool_compare.
1940
1941 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1942
1943 PR c/45584
1944 * c-typeck.c (build_c_cast): Do a conversion even when the
1945 TYPE_MAIN_VARIANTs are the same.
1946
1947 2014-08-19 Marek Polacek <polacek@redhat.com>
1948
1949 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1950 pedwarn_c99 instead of pedwarn.
1951 (grokfield): Likewise.
1952 (warn_defaults_to): New function.
1953 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1954 Unconditionally call pedwarn_c99 instead of pedwarn.
1955 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1956 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1957 check flag_isoc11 before.
1958 * c-errors.c (pedwarn_c99): Change the return type to bool.
1959 Handle -Wc99-c11-compat.
1960 * c-parser.c (disable_extension_diagnostics): Handle
1961 warn_c99_c11_compat.
1962 (restore_extension_diagnostics): Likewise.
1963 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1964 instead of pedwarn, don't check flag_isoc11 before.
1965 (c_parser_declspecs): Likewise.
1966 (c_parser_alignas_specifier): Likewise.
1967 (c_parser_alignof_expression): Likewise.
1968 (c_parser_generic_selection): Likewise.
1969 * c-tree.h (pedwarn_c99): Update declaration.
1970 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1971 of pedwarn_c99.
1972
1973 2014-08-19 Marek Polacek <polacek@redhat.com>
1974
1975 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1976 to pedwarn_c90.
1977 * c-errors.c: Include "opts.h".
1978 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1979 * c-parser.c (disable_extension_diagnostics): Handle negative value
1980 of warn_c90_c99_compat, too.
1981 (restore_extension_diagnostics): Likewise.
1982 (c_parser_compound_statement_nostart): Pass
1983 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1984
1985 2014-08-12 Marek Polacek <polacek@redhat.com>
1986
1987 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1988 Add pedwarn.
1989 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1990 Likewise.
1991 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1992
1993 2014-08-10 Marek Polacek <polacek@redhat.com>
1994
1995 PR c/51849
1996 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1997 Call pedwarn_c90 instead of pedwarn.
1998 (check_bitfield_type_and_width): Likewise.
1999 (declspecs_add_qual): Likewise.
2000 (declspecs_add_type): Likewise.
2001 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2002 Adjust to only call pedwarn_c90.
2003 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2004 pedwarn_c90 instead of pedwarn.
2005 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2006 * c-parser.c (disable_extension_diagnostics): Handle
2007 warn_c90_c99_compat.
2008 (restore_extension_diagnostics): Likewise.
2009 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2010 pedwarn_c90 instead of pedwarn.
2011 (c_parser_initelt): Likewise.
2012 (c_parser_postfix_expression): Likewise.
2013 (c_parser_postfix_expression_after_paren_type): Likewise.
2014 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2015 * c-tree.h: Fix formatting.
2016 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2017 pedwarn_c90 instead of pedwarn.
2018
2019 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2020
2021 * c-typeck.c: Remove include of pointer-set.h.
2022
2023 2014-08-07 Marek Polacek <polacek@redhat.com>
2024
2025 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2026
2027 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2028
2029 * c-typeck.c: Use hash_map instead of pointer_map.
2030
2031 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2032
2033 * c-decl.c: Use hash_set instead of pointer_set.
2034
2035 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2036
2037 PR middle-end/61455
2038 * c-array-notation.c (expand_array_notations): Handling
2039 of DECL_EXPR added.
2040
2041 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2042
2043 PR c++/60517
2044 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2045 a local variable.
2046
2047 2014-07-30 Tom Tromey <tromey@redhat.com>
2048
2049 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2050 field.
2051 (really_start_incremental_init, push_init_level): Initialize
2052 designator_depth.
2053 (pop_init_level): Set global designator_depth.
2054 (process_init_element): Check for designated_init attribute.
2055
2056 2014-07-20 Marek Polacek <polacek@redhat.com>
2057
2058 PR c/61852
2059 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2060 (implicitly_declare): Pass location to implicit_decl_warning.
2061
2062 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2063
2064 PR middle-end/61294
2065 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2066 If non-NULL, call c_parser_check_literal_zero.
2067 (c_parser_check_literal_zero): New function.
2068 (c_parser_postfix_expression_after_primary): Adjust
2069 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2070
2071 2014-07-06 Marek Polacek <polacek@redhat.com>
2072
2073 PR c/6940
2074 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2075 * c-tree.h (C_ARRAY_PARAMETER): Define.
2076 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2077 function parameter.
2078
2079 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2080 Chen Gang <gang.chen.5i5j@gmail.com>
2081
2082 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2083 releasing symbol.
2084
2085 2014-07-01 Marek Polacek <polacek@redhat.com>
2086
2087 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2088 instead of 0 to WARN_FOR_ASSIGNMENT.
2089
2090 2014-07-01 Marek Polacek <polacek@redhat.com>
2091
2092 PR c/58286
2093 * c-typeck.c (convert_for_assignment): Pass
2094 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2095
2096 2014-06-30 Marek Polacek <polacek@redhat.com>
2097
2098 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2099 has no_sanitize_undefined attribute.
2100
2101 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2102
2103 PR middle-end/57541
2104 * c-array-notation.c (fix_builtin_array_notation_fn):
2105 Check for 0 arguments in builtin call. Check that bultin argument is
2106 correct.
2107 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2108 index.
2109
2110 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2111
2112 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2113 qualifiers in __auto_type for atomic types.
2114 (c_parser_typeof_specifier): Discard all type qualifiers in
2115 __typeof__ for atomic types.
2116
2117 2014-06-25 Marek Polacek <polacek@redhat.com>
2118
2119 PR c/61162
2120 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2121 the return expression to c_finish_return.
2122
2123 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2124
2125 * c-typeck.c (c_finish_omp_clauses): Make sure
2126 OMP_CLAUSE_LINEAR_STEP has correct type.
2127
2128 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2129
2130 * c-decl.c: Adjust.
2131
2132 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2133
2134 * c-parser.c (c_parser_omp_for_loop): For
2135 #pragma omp parallel for simd move lastprivate clause from parallel
2136 to for rather than simd.
2137
2138 2014-06-23 Marek Polacek <polacek@redhat.com>
2139
2140 * c-typeck.c (parser_build_binary_op): Don't call
2141 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2142
2143 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2144
2145 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2146 * c-decl.c (merge_decls): Likewise.
2147
2148 2014-06-09 Marek Polacek <polacek@redhat.com>
2149
2150 PR c/36446
2151 * c-typeck.c (error_init): Call inform instead of error_at.
2152 (pedwarn_init): Call inform instead of pedwarn.
2153 (warning_init): Call inform instead of warning_at.
2154
2155 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2156
2157 * c-decl.c (merge_decls): Use set_decl_section_name.
2158 (duplicate_decls): Remove node if it exists.
2159
2160 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2161
2162 PR c/53119
2163 * c-typeck.c (push_init_level, process_init_element,
2164 pop_init_level): Correct check for zero initialization, move
2165 missing brace warning to respect zero initialization.
2166
2167 2014-06-05 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/56724
2170 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2171
2172 2014-06-05 Marek Polacek <polacek@redhat.com>
2173
2174 PR c/49706
2175 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2176 on the left hand side operand of a comparison.
2177
2178 2014-06-05 Marek Polacek <polacek@redhat.com>
2179
2180 PR c/48062
2181 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2182 Print note only if the warning was printed.
2183
2184 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2185
2186 PR c/58942
2187 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2188 with a pointer.
2189
2190 2014-06-03 Marek Polacek <polacek@redhat.com>
2191
2192 PR c/60439
2193 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2194 c_start_case.
2195 * c-tree.h (c_start_case): Update.
2196 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2197 switch condition has boolean value.
2198
2199 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2200
2201 * c-decl.c: Include builtins.h.
2202 * c-parser.c: Likewise.
2203
2204 2014-05-27 Marek Polacek <polacek@redhat.com>
2205
2206 PR c/56724
2207 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2208 error and warning calls to error_at and warning_at. Pass location of
2209 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2210 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2211 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2212
2213 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2214
2215 PR c/61191
2216 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2217 function parameters.
2218
2219 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2220
2221 * c-decl.c (merge_decls): Preserve symtab node pointers.
2222 (duplicate_decls): Free new decl.
2223
2224 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2225
2226 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2227 initialization.
2228
2229 * c-parser.c (c_parser_omp_target): Return bool values.
2230
2231 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2232
2233 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2234 num_teams_loc variable to num_thread_limit_loc.
2235
2236 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2237
2238 * c-array-notation.c (expand_array_notations): Use void_node
2239 instead of void_zero_node.
2240
2241 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2242
2243 * c-decl.c (finish_struct): Adjust.
2244 (finish_enum): Likewise.
2245 (bind): Adjust.
2246 (record_inline_static): Likewise.
2247 (push_scope): Likewise.
2248 (make_label): Likewise.
2249 (lookup_label_for_goto): Likewise.
2250 (finish_struct): Likewise.
2251 (finish_enum): Likewise.
2252 (store_parm_decls): Likewise.
2253 (c_push_function_context): Likewise.
2254 * c-lang.h: Remove usage of variable_size gty attribute.
2255 * c-parser.c (c_parse_init): Adjust.
2256 (c_parse_file): Likewise.
2257
2258 2014-05-13 Marek Polacek <polacek@redhat.com>
2259
2260 PR c/61162
2261 * c-typeck.c (convert_for_assignment): Pass location to
2262 WARN_FOR_ASSIGNMENT instead of input_location.
2263
2264 2014-05-10 Marek Polacek <polacek@redhat.com>
2265
2266 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2267 maybe_warn_string_init.
2268 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2269 maybe_warn_string_init.
2270 * c-tree.h (maybe_warn_string_init): Update declaration.
2271 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2272 Call pedwarn_init with loc instead of with input_location.
2273 (digest_init): Pass init_loc to maybe_warn_string_init.
2274 (pop_init_level): Call pedwarn_init with loc instead of with
2275 input_location.
2276 (set_init_index): Likewise.
2277 (process_init_element): Likewise.
2278
2279 2014-05-09 Marek Polacek <polacek@redhat.com>
2280
2281 PR c/61096
2282 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2283 (c_parser_initelt): Pass location to set_init_label. Pass array index
2284 location to set_init_index.
2285 * c-tree.h (push_init_level): Update declaration.
2286 (pop_init_level): Likewise.
2287 (set_init_index): Likewise.
2288 (set_init_label): Likewise.
2289 * c-typeck.c (error_init): Add location parameter. Call error_at
2290 instead of error.
2291 (digest_init): Pass init_loc to error_init.
2292 (really_start_incremental_init):
2293 (push_init_level): Add location parameter. Pass loc to pop_init_level
2294 and error_init.
2295 (pop_init_level): Likewise.
2296 (set_designator): Add location parameter. Pass loc to pop_init_level,
2297 push_init_level, and error_init.
2298 (set_init_index): Add location parameter. Pass loc to error_init and
2299 set_designator.
2300 (set_init_label): Likewise.
2301 (output_init_element): Pass loc to error_init.
2302 (process_init_element): Pass loc to error_init, pop_init_level,
2303 pedwarn_init, and push_init_level.
2304
2305 2014-05-09 Marek Polacek <polacek@redhat.com>
2306
2307 PR c/50459
2308 * c-parser.c (c_parser_attributes): Parse the arguments as an
2309 expression-list if the attribute takes identifier.
2310
2311 2014-05-08 Marek Polacek <polacek@redhat.com>
2312
2313 PR c/61053
2314 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2315 TYPE_ALIGN_UNIT.
2316
2317 2014-05-08 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/61077
2320 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2321 of main.
2322
2323 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2324 Mike Stump <mikestump@comcast.net>
2325 Richard Sandiford <rdsandiford@googlemail.com>
2326
2327 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2328 (finish_enum): Use wide-int interfaces.
2329 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2330 * c-typeck.c (build_c_cast): Likewise.
2331 (set_nonincremental_init_from_string): Likewise.
2332 (c_tree_equal): Likewise.
2333
2334 2014-05-02 Marek Polacek <polacek@redhat.com>
2335
2336 PR c/25801
2337 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2338 Return size_one_node when the type is not complete.
2339 (pointer_diff): Remove comment.
2340 (build_unary_op): Improve error messages.
2341
2342 2014-05-02 Marek Polacek <polacek@redhat.com>
2343
2344 * c-typeck.c (c_finish_return): Separate warning_at calls.
2345
2346 2014-05-02 Marek Polacek <polacek@redhat.com>
2347
2348 * c-tree.h (error_init): Remove declaration.
2349 (pedwarn_init): Likewise.
2350 * c-typeck.c (error_init): Make static and move above.
2351 (pedwarn_init): Likewise.
2352 (warning_init): Move above.
2353 (maybe_warn_string_init): Likewise.
2354
2355 2014-05-01 Jeff Law <law@redhat.com>
2356
2357 Revert:
2358
2359 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2360 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2361 avoid goto.
2362
2363 2014-05-02 Marek Polacek <polacek@redhat.com>
2364
2365 PR c/60784
2366 * c-typeck.c (push_init_level): Set constructor_designated to
2367 p->designated for structures.
2368
2369 2014-05-01 Marek Polacek <polacek@redhat.com>
2370
2371 PR c/60915
2372 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2373 function-definition has an attribute after the declarator.
2374
2375 2014-05-01 Marek Polacek <polacek@redhat.com>
2376
2377 PR c/60257
2378 * c-typeck.c (warning_init): Add location_t parameter. Call
2379 warning_at instead of warning.
2380 (push_init_level): Pass input_location to warning_init.
2381 (add_pending_init): Add location_t parameter. Pass loc to
2382 warning_init.
2383 (set_nonincremental_init): Pass input_location to add_pending_init.
2384 (set_nonincremental_init_from_string): Likewise.
2385 (output_init_element): Pass loc to warning_init and to
2386 add_pending_init.
2387
2388 2014-05-01 Marek Polacek <polacek@redhat.com>
2389
2390 PR c/43395
2391 * c-typeck.c (c_finish_return): Distinguish between label and variable
2392 when warning about returning local address.
2393
2394 2014-05-01 Marek Polacek <polacek@redhat.com>
2395
2396 PR c/29467
2397 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2398 in C89 mode.
2399
2400 2014-05-01 Marek Polacek <polacek@redhat.com>
2401
2402 PR c/43245
2403 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2404 instead of 0 to WARN_FOR_QUALIFIERS.
2405
2406 2014-05-01 Marek Polacek <polacek@redhat.com>
2407
2408 PR c/56989
2409 * c-typeck.c (default_conversion): Use better location for
2410 error call.
2411
2412 2014-04-30 Marek Polacek <polacek@redhat.com>
2413
2414 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2415 also when SANITIZE_FLOAT_DIVIDE is on.
2416
2417 2014-04-30 Marek Polacek <polacek@redhat.com>
2418
2419 PR c/60139
2420 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2421 and pedwarn_init. Use loc insted of input_location.
2422
2423 2014-04-30 Marek Polacek <polacek@redhat.com>
2424
2425 PR c/60351
2426 * c-typeck.c (build_binary_op): Use location when warning about
2427 shift count.
2428
2429 2014-04-25 Marek Polacek <polacek@redhat.com>
2430
2431 PR c/18079
2432 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2433 always_inline/noinline and hot/cold attributes.
2434
2435 2014-04-25 Marek Polacek <polacek@redhat.com>
2436
2437 PR c/60114
2438 * c-parser.c (c_parser_initelt): Pass input_location to
2439 process_init_element.
2440 (c_parser_initval): Pass loc to process_init_element.
2441 * c-tree.h (process_init_element): Adjust declaration.
2442 * c-typeck.c (push_init_level): Pass input_location to
2443 process_init_element.
2444 (pop_init_level): Likewise.
2445 (set_designator): Likewise.
2446 (output_init_element): Add location_t parameter. Pass loc to
2447 digest_init.
2448 (output_pending_init_elements): Pass input_location to
2449 output_init_element.
2450 (process_init_element): Add location_t parameter. Pass loc to
2451 output_init_element.
2452
2453 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2454
2455 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2456 atomic-clause, allow comma in between atomic-clause and
2457 seq_cst.
2458
2459 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR c/59073
2462 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2463 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2464
2465 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2466
2467 PR middle-end/60469
2468 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2469 create_tmp_var instead build_decl for creating temps.
2470 (build_array_notation_expr): Likewise.
2471 (fix_conditional_array_notations_1): Likewise.
2472 (fix_array_notation_expr): Likewise.
2473 (fix_array_notation_call_expr): Likewise.
2474
2475 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2476
2477 PR c++/60689
2478 * c-tree.h (c_build_function_call_vec): New prototype.
2479 * c-typeck.c (build_function_call_vec): Don't call
2480 resolve_overloaded_builtin here.
2481 (c_build_function_call_vec): New wrapper function around
2482 build_function_call_vec. Call resolve_overloaded_builtin here.
2483 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2484 Call c_build_function_call_vec instead of build_function_call_vec.
2485 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2486 * c-decl.c (finish_decl): Likewise.
2487
2488 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2489
2490 PR c/55383
2491 * c-typeck.c: Use correct format string in cast-qual warning
2492
2493 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2494
2495 * c-decl.c (c_decl_attributes): Use
2496 lang_hooks.types.omp_mappable_type.
2497 * c-typeck.c (c_finish_omp_clauses): Likewise.
2498
2499 2014-03-06 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/60197
2502 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2503 of checking tree code.
2504
2505 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2506
2507 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2508 (c_parser_parameter_declaration): Likewise.
2509
2510 2014-02-19 Marek Polacek <polacek@redhat.com>
2511
2512 PR c/60195
2513 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2514 Call mark_exp_read on exp.value.
2515 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2516 TREE_ADDRESSABLE on old instead of val.
2517 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2518
2519 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2520
2521 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2522 C_EXPR_APPEND by vec_safe_push.
2523 * c-tree.h (C_EXPR_APPEND): Remove.
2524
2525 2014-01-31 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/59963
2528 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2529 build_function_call_vec.
2530 (build_function_call): Likewise.
2531 (build_atomic_assign): Likewise.
2532 (build_function_call_vec): Add arg_loc parameter. Use it.
2533 (convert_arguments): Likewise.
2534 (convert_for_assignment): Rename rhs_loc to expr_loc.
2535 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2536 (c_parser_objc_keywordexpr): Likewise.
2537 (c_parser_postfix_expression_after_primary): Call
2538 build_function_call_vec with expr_loc rather than op_loc.
2539 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2540 build_function_call_vec.
2541 (c_parser_expr_list): Add locations parameter. Fill it with locations
2542 of function arguments.
2543 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2544
2545 2014-01-30 Marek Polacek <polacek@redhat.com>
2546
2547 PR c/59940
2548 * c-typeck.c (build_function_call_vec): Use loc parameter.
2549 (convert_arguments): Add location parameter. Use it.
2550 (ep_convert_and_check): Likewise.
2551 (build_atomic_assign): Adjust convert_for_assignment call.
2552 (build_modify_expr): Likewise.
2553 (digest_init): Likewise.
2554 (c_finish_return): Likewise.
2555 (build_conditional_expr): Adjust ep_convert_and_check calls.
2556 (convert_for_assignment): Add rhs_loc parameter. Use it.
2557 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2558 calls.
2559
2560 2014-01-30 Richard Biener <rguenther@suse.de>
2561
2562 PR c/59905
2563 * c-typeck.c (build_function_call_vec): Do not replace calls
2564 to a function via an incompatible type with a runtime abort.
2565
2566 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2567
2568 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2569 flag_enable_cilkplus with flag_cilkplus.
2570 (c_parser_direct_declarator_inner): Likewise.
2571 (c_parser_attribute_any_word): Likewise.
2572 (c_parser_attributes): Likewise.
2573 (c_parser_compound_statement): Likewise.
2574 (c_parser_statement_after_labels): Likewise.
2575 (c_parser_if_statement): Likewise.
2576 (c_parser_switch_statement): Likewise.
2577 (c_parser_do_statement): Likewise.
2578 (c_parser_for_statement): Likewise.
2579 (c_parser_unary_expression): Likewise.
2580 (c_parser_postfix_expression): Likewise.
2581 (c_parser_postfix_expression_after_primary): Likewise.
2582 (c_parser_postfix_expression_after_primary): Likewise.
2583 (c_parser_omp_clause_name): Likewise.
2584 (c_finish_omp_declare_simd): Likewise.
2585 (c_parser_cilk_verify_simd): Likewise.
2586 * c-typeck.c (build_array_ref): Likewise.
2587 (build_function_call_vec): Likewise.
2588 (convert_arguments): Likewise.
2589 (build_compound_expr): Likewise.
2590 (c_finish_return): Likewise.
2591 (c_finish_if_stmt): Likewise.
2592 (c_finish_loop): Likewise.
2593 (build_binary_op): Likewise.
2594
2595 2014-01-23 Marek Polacek <polacek@redhat.com>
2596
2597 PR c/59846
2598 * c-typeck.c (parser_build_binary_op): Use location instead of
2599 input_location.
2600 (build_binary_op): Pass location to shorten_compare.
2601
2602 2014-01-23 Marek Polacek <polacek@redhat.com>
2603
2604 PR c/58346
2605 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2606 an empty aggregate.
2607
2608 2014-01-23 Marek Polacek <polacek@redhat.com>
2609
2610 PR c/59871
2611 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2612 of a comma expression.
2613 (emit_side_effect_warnings): Likewise.
2614
2615 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2616
2617 PR c/59825
2618 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2619 function to use walk_tree and moved a lot of its functionality to
2620 expand_array_notations.
2621 (expand_array_notations): New function.
2622
2623 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2624
2625 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2626 attribute an attribute without value.
2627
2628 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2629
2630 PR middle-end/58809
2631 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2632 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2633
2634 2014-01-22 Marek Polacek <polacek@redhat.com>
2635
2636 PR c/59891
2637 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2638 of remove_c_maybe_const_expr on op1 and op2.
2639
2640 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR c/58943
2643 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2644 effects, preevaluate rhs using SAVE_EXPR first.
2645
2646 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2647
2648 PR c++/59631
2649 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2650 statements with if-elseif statements.
2651
2652 2014-01-06 Marek Polacek <polacek@redhat.com>
2653
2654 PR c/57773
2655 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2656 defined bit-field types only in ISO C.
2657
2658 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2659
2660 Update copyright years
2661
2662 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2663
2664 * c-array-notation.c: Use the standard form for the copyright notice.
2665
2666 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2667
2668 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2669 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2670 field in parser is not empty. If not-empty, call the function
2671 c_parser_finish_omp_declare_simd.
2672 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2673 between SIMD-enabled functions and #pragma simd. Added new parameter.
2674 (c_parser_cilk_all_clauses): Modified the usage of the function
2675 c_parser_cilk_clause_vectorlength as mentioned above.
2676 (c_parser_cilk_simd_fn_vector_attrs): New function.
2677 (c_finish_cilk_simd_fn_tokens): Likewise.
2678 (is_cilkplus_vector_p): Likewise.
2679 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2680 "nomask," and "mask" strings in clause name.
2681 (c_parser_omp_all_clauses): Added 3 new case statements:
2682 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2683 PRAGMA_CILK_CLAUSE_NOMASK.
2684 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2685 check for vector attribute and if so call the function
2686 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2687 called the function c_finish_cilk_simd_fn_tokens.
2688 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2689 parser field is non-empty. If so, parse them as you would parse
2690 the omp declare simd pragma.
2691 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2692 Added a check when step is a parameter and flag it as error.
2693 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2694 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2695 pragma_omp_clause.
2696
2697 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2698
2699 * c-parser.c (c_parser_omp_parallel): Fix description.
2700
2701 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2702
2703 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2704 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2705 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2706 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2707
2708 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2709
2710 PR c/52023
2711 * c-parser.c (c_parser_alignas_specifier): Use
2712 c_sizeof_or_alignof_type instead of c_alignof.
2713 (c_parser_alignof_expression): Likewise, with min_alignof
2714 parameter depending on alignof spelling used.
2715
2716 2013-12-04 Marek Polacek <polacek@redhat.com>
2717
2718 PR c/54113
2719 * c-decl.c (start_function): Don't warn for missing prototype for
2720 inline functions.
2721
2722 2013-12-03 Marek Polacek <polacek@redhat.com>
2723
2724 PR c/59351
2725 * c-decl.c (build_compound_literal): Allow compound literals with
2726 empty initial value.
2727
2728 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2729
2730 PR c/58235
2731 * c-typeck.c (build_modify_expr): Diagnose assignment to
2732 expression with array type.
2733
2734 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2735
2736 PR c/42262
2737 * c-typeck.c (process_init_element): Do not treat a string as
2738 initializing a whole array when used with a designator for an
2739 individual element.
2740
2741 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2742
2743 PR c/57574
2744 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2745 an inline function following a static declaration.
2746
2747 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2748
2749 PR c/59310
2750 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2751 to p_name before calling c_parser_omp_teams instead of after.
2752 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2753 argument. Remove unused p_name variable.
2754
2755 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2756 Jakub Jelinek <jakub@redhat.com>
2757
2758 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2759 external_scope is NULL.
2760
2761 2013-11-27 Tom de Vries <tom@codesourcery.com>
2762 Marc Glisse <marc.glisse@inria.fr>
2763
2764 PR c++/59032
2765 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2766
2767 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2768
2769 * c-typeck.c: Add required include files from gimple.h.
2770
2771 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2772
2773 * c-decl.c (define_label, shadow_tag_warned)
2774 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2775 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2776 (declspecs_add_type): Remove use of in_system_header macro.
2777 * c-parser.c (c_parser_unary_expression): Likewise.
2778 * c-typeck.c (store_init_value, process_init_element)
2779 (c_start_case): Likewise.
2780
2781 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2782 macro.
2783
2784 * c-parser.c (c_parser_set_source_position_from_token): Remove
2785 reference to in_system_header from comment.
2786
2787 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2788
2789 * c-decl.c (grokdeclarator): Update comment to refer to
2790 tree_to_[su]hwi rather than tree_low_cst.
2791
2792 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2793
2794 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2795 tree_to_uhwi throughout.
2796
2797 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2798
2799 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2800 throughout.
2801
2802 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2803
2804 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2805 throughout.
2806
2807 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2808
2809 * c-parser.c (c_parser_cilk_simd): New.
2810 (c_parser_cilk_verify_simd): New.
2811 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2812 (c_parser_omp_for_loop): Add case for NE_EXPR.
2813 Set c_break_label for CILK_SIMD.
2814 (c_parser_cilk_clause_vectorlength): New.
2815 (c_parser_cilk_clause_linear): New.
2816 (c_parser_cilk_clause_name): New.
2817 (c_parser_cilk_all_clauses): New.
2818 * c-typeck.c (build_unary_op): Pass location argument to
2819 readonly_error.
2820 (build_modify_expr): Same.
2821 (build_asm_expr): Same.
2822 (c_finish_bc_stmt): Error on break/continue in loops.
2823
2824 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2825
2826 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2827
2828 2013-11-14 Diego Novillo <dnovillo@google.com>
2829
2830 * c-decl.c: Include print-tree.h.
2831 Include stor-layout.h.
2832 Include varasm.h.
2833 Include attribs.h.
2834 Include stringpool.h.
2835 * c-lang.c: Include fold-const.h.
2836 * c-parser.c: Include stringpool.h.
2837 Include attribs.h.
2838 Include stor-layout.h.
2839 Include varasm.h.
2840 Include trans-mem.h.
2841 * c-typeck.c: Include stor-layout.h.
2842 Include trans-mem.h.
2843 Include varasm.h.
2844 Include stmt.h.
2845
2846 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2847
2848 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2849 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2850 __auto_type.
2851 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2852 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2853 RID_AUTO_TYPE.
2854 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2855 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2856 (c_parser_declarator, c_parser_direct_declarator_inner)
2857 (c_parser_parameter_declaration, c_parser_type_name): All callers
2858 changed.
2859 (c_parser_declaration_or_fndef): Handle declarations with type
2860 determined from the initializer.
2861
2862 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2863
2864 * c-typeck.c: Include gimplify.h.
2865
2866 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2867
2868 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2869 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2870 comment.
2871 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2872 or _Thread_local as appropriate in diagnostics.
2873 (build_null_declspecs): Initialize ret->thread_gnu_p.
2874 (declspecs_add_scspec): Handle either __thread or _Thread_local
2875 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2876 pedantic. Do not disallow _Thread_local extern and _Thread_local
2877 static.
2878
2879 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2880 Andrew MacLeod <amacleod@redhat.com>
2881
2882 * c-aux-info.c (gen_type): Handle atomic qualifier.
2883 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2884 qualifiers when compating types.
2885 (shadow_tag_warned): Handle atomic_p in declspecs.
2886 (quals_from_declspecs): Likewise.
2887 (start_decl): Use c_type_promotes_to when promoting argument
2888 types.
2889 (grokdeclarator): Handle _Atomic.
2890 (get_parm_info): Diagnose any qualifier on "void" as only
2891 parameter.
2892 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2893 comparing types. Use c_type_promotes_to when promoting argument
2894 types.
2895 (finish_function): Use c_type_promotes_to when promoting argument
2896 types.
2897 (build_null_declspecs): Handle atomic_p in declspecs.
2898 (declspecs_add_qual): Handle RID_ATOMIC.
2899 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2900 (c_token_starts_declspecs): Handle RID_ATOMIC.
2901 (c_parser_declspecs): Handle atomic type specifiers and
2902 qualifiers.
2903 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2904 from types of expressions with atomic type.
2905 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2906 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2907 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2908 (c_parser_statement_after_labels, c_parser_switch_statement)
2909 (c_parser_for_statement, c_parser_expr_no_commas)
2910 (c_parser_conditional_expression, c_parser_binary_expression)
2911 (c_parser_cast_expression, c_parser_unary_expression)
2912 (c_parser_postfix_expression)
2913 (c_parser_postfix_expression_after_primary, c_parser_expression):
2914 Use convert_lvalue_to_rvalue.
2915 (c_parser_expression_conv, c_parser_expr_list): Document
2916 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2917 (c_parser_objc_synchronized_statement): Use
2918 convert_lvalue_to_rvalue.
2919 (c_parser_objc_selector): Handle RID_ATOMIC.
2920 (c_parser_objc_receiver, c_parser_array_notation): Use
2921 convert_lvalue_to_rvalue.
2922 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2923 _Atomic (type-name).
2924 (struct c_declspecs): Add atomic_p field.
2925 (convert_lvalue_to_rvalue): Declare.
2926 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2927 corresponding atomic types.
2928 (qualify_type): Don't add _Atomic qualifiers from second argument.
2929 (comp_target_types): Do not allow _Atomic mismatches.
2930 (type_lists_compatible_p): Do not remove atomic qualifiers when
2931 comparing types.
2932 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2933 (build_atomic_assign): New functions.
2934 (build_unary_op): Use build_atomic_assign for atomic increment and
2935 decrement.
2936 (build_conditional_expr): Do not treat _Atomic void as a qualified
2937 version of void.
2938 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2939 (find_anonymous_field_with_type, convert_to_anonymous_field)
2940 (convert_for_assignment): Do not remove atomic qualifiers when
2941 comparing types.
2942 (digest_init): Do not accept initialization of arrays of atomic
2943 elements by string constants.
2944 (build_asm_expr): Use convert_lvalue_to_rvalue.
2945 (build_binary_op): Do not treat _Atomic void as a qualified
2946 version of void.
2947
2948 2013-11-06 DJ Delorie <dj@redhat.com>
2949
2950 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2951 both explicit and builtin, print the location of the explicit one.
2952
2953 2013-11-05 Tobias Burnus <burnus@net-b.de>
2954
2955 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2956 c_parser_omp_distribute, c_parser_omp_teams,
2957 c_parser_omp_target, c_parser_omp_declare): Handle
2958 -fopenmp-simd.
2959
2960 2013-11-03 Marek Polacek <polacek@redhat.com>
2961
2962 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2963
2964 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2965
2966 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2967 check_dup_generic at the end, unless remove is true.
2968 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2969 remove = true;.
2970 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2971
2972 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2973
2974 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2975 with decl that is not pointer nor array.
2976
2977 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2978
2979 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2980 a spawning function is found.
2981 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2982 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2983 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2984 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2985 case.
2986 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2987 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2988 expr.
2989 (c_finish_return): Added a check to reject _Cilk_spawn in return
2990 expression.
2991 (build_cilk_spawn): New function.
2992 (build_cilk_sync): Likewise.
2993 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2994
2995 2013-10-27 Tobias Burnus <burnus@net-b.de>
2996
2997 PR other/33426
2998 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2999 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3000 (c_parser_statement_after_labels): Update calls.
3001
3002 2013-10-24 Tobias Burnus <burnus@net-b.de>
3003
3004 PR other/33426
3005 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3006 Handle PRAGMA_IVDEP.
3007 (c_parser_statement_after_labels): Update call.
3008
3009 2013-10-24 Marek Polacek <polacek@redhat.com>
3010
3011 * c-parser.c (c_parser_struct_declaration): Add a comment.
3012 (c_parser_declarator): Don't allow _Alignas here.
3013
3014 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3015
3016 * c-parser.c: Include omp-low.h.
3017 * c-typeck.c: Likewise.
3018
3019 2013-10-17 Marek Polacek <polacek@redhat.com>
3020
3021 PR c/58267
3022 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3023 Document syntax of the array-declarator.
3024 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3025 are not permitted.
3026 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3027 (c_parser_struct_declaration): Likewise.
3028 (c_parser_declarator): Likewise.
3029 (c_parser_direct_declarator_inner): Likewise.
3030 (c_parser_parameter_declaration): Likewise.
3031 (c_parser_type_name): Likewise.
3032
3033 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3034
3035 * c-lang.h (current_omp_declare_target_attribute): New extern
3036 decl.
3037 * c-parser.c: Include c-lang.h.
3038 (struct c_parser): Change tokens to c_token *.
3039 Add tokens_buf field. Change tokens_avail type to unsigned int.
3040 (c_parser_consume_token): If parser->tokens isn't
3041 &parser->tokens_buf[0], increment parser->tokens.
3042 (c_parser_consume_pragma): Likewise.
3043 (enum pragma_context): Add pragma_struct and pragma_param.
3044 (c_parser_external_declaration): Adjust
3045 c_parser_declaration_or_fndef caller.
3046 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3047 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3048 Adjust recursive call.
3049 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3050 of pragma_external.
3051 (c_parser_parameter_declaration): Use pragma_param instead of
3052 pragma_external.
3053 (c_parser_compound_statement_nostart, c_parser_label,
3054 c_parser_for_statement): Adjust
3055 c_parser_declaration_or_fndef callers.
3056 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3057 it through to c_parser_conditional_expression.
3058 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3059 pass it through to c_parser_binary_expression. Adjust recursive
3060 call.
3061 (c_parser_binary_expression): Remove prec argument, add
3062 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3063 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3064 binop matches it, use build2 instead of parser_build_binary_op.
3065 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3066 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3067 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3068 Handle pragma_struct and pragma_param the same as pragma_external.
3069 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3070 (c_parser_omp_variable_list): Parse array sections for
3071 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3072 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3073 (c_parser_omp_clause_reduction): Handle user defined reductions.
3074 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3075 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3076 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3077 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3078 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3079 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3080 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3081 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3082 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3083 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3084 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3085 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3086 (c_parser_omp_for_loop): Add CODE argument, pass it through
3087 to c_finish_omp_for. Change last argument to cclauses,
3088 and adjust uses to grab parallel clauses from the array of all
3089 the split clauses. Adjust c_parser_binary_expression,
3090 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3091 (omp_split_clauses): New function.
3092 (c_parser_omp_simd): New function.
3093 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3094 Allow the function to be called also when parsing combined constructs,
3095 and call c_parser_omp_simd when parsing for simd.
3096 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3097 #pragma omp section, require exactly one structured-block instead of
3098 sequence of statements.
3099 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3100 Allow the function to be called also when parsing combined constructs.
3101 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3102 Allow the function to be called also when parsing combined
3103 constructs.
3104 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3105 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3106 c_parser_omp_teams, c_parser_omp_target_data,
3107 c_parser_omp_target_update, c_parser_omp_target,
3108 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3109 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3110 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3111 (c_parser_omp_construct): Add p_name and mask vars. Handle
3112 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3113 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3114 and c_parser_omp_sections callers.
3115 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3116 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3117 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3118 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3119 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3120 OMP_CLAUSE_DEPEND.
3121 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3122 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3123 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3124 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3125 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3126 * c-typeck.c: Include tree-inline.h.
3127 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3128 handle_omp_array_sections_1, handle_omp_array_sections,
3129 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3130 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3131 user defined reductions.
3132 (c_tree_equal): New function.
3133 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3134 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3135 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3136 c_check_omp_declare_reduction_r): New prototypes.
3137 * c-decl.c (current_omp_declare_target_attribute): New variable.
3138 (c_decl_attributes): New function.
3139 (start_decl, start_function): Use it instead of decl_attributes.
3140 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3141 c_omp_reduction_decl, c_omp_reduction_lookup,
3142 c_check_omp_declare_reduction_r): New functions.
3143
3144 2013-09-25 Tom Tromey <tromey@redhat.com>
3145
3146 * Make-lang.in (c/gccspec.o): Remove.
3147 (CFLAGS-c/gccspec.o): New variable.
3148 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3149 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3150 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3151
3152 2013-09-25 Tom Tromey <tromey@redhat.com>
3153
3154 * Make-lang.in (c/gccspec.o): Don't use subshell.
3155
3156 2013-09-18 Marek Polacek <polacek@redhat.com>
3157
3158 PR sanitize/58443
3159 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3160 Remove unnecessary check.
3161
3162 2013-09-18 Marek Polacek <polacek@redhat.com>
3163
3164 PR sanitizer/58411
3165 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3166 no_sanitize_undefined attribute.
3167
3168 2013-09-13 Kai Tietz <ktietz@redhat.com>
3169
3170 PR target/57848
3171 * c-decl.c (c_builtin_function_ext_scope): Remove
3172 wrong assumption that it is never called on prexisting
3173 symbol.
3174
3175 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3176
3177 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3178
3179 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3180
3181 * c-objc-common.c (c_tree_printer): Tidy.
3182
3183 2013-08-30 Marek Polacek <polacek@redhat.com>
3184
3185 * c-typeck.c (build_binary_op): Add division by zero and shift
3186 instrumentation.
3187
3188 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3189 Joseph Myers <joseph@codesourcery.com>
3190
3191 PR c/35649
3192 * c-typeck.c (c_common_type): Prefer double_type_node over
3193 other REAL_TYPE types with the same precision.
3194 (convert_arguments): Likewise.
3195
3196 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3197
3198 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3199 (c_initialize_diagnostics): Call a destructor for the early printer.
3200
3201 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3202
3203 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3204 printer initialization.
3205
3206 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3207
3208 PR c/57490
3209 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3210 check for truth values.
3211 (expand_array_notation_exprs): Added truth values case. Removed an
3212 unwanted else. Added for-loop to walk through subtrees in default
3213 case.
3214
3215 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3216
3217 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3218
3219 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3220
3221 * c-parser.c (struct c_generic_association): Fix typo.
3222
3223 2013-07-23 Tom Tromey <tromey@redhat.com>
3224 Joseph Myers <joseph@codesourcery.com>
3225
3226 * c-parser.c (struct c_generic_association): New.
3227 (c_generic_association_d): New typedef.
3228 (c_parser_generic_selection): New function.
3229 (c_parser_postfix_expression): Handle RID_GENERIC.
3230
3231 2013-07-13 Jason Merrill <jason@redhat.com>
3232
3233 PR c++/57793
3234 * c-decl.c (finish_struct): Check for too-large class.
3235
3236 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3237
3238 PR c/57821
3239 * c-typeck.c (set_init_index): When folding, check for index overflow.
3240
3241 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3242
3243 * c-parser.c (c_parser_array_notation): Removed rejection of array
3244 notations in an array of function pointers.
3245
3246 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3247
3248 * c-array-notation.c (make_triplet_val_inv): New function.
3249 (create_cmp_incr): Likewise.
3250 (create_array_refs): Likewise.
3251 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3252 Also modularized common parts between functions and called the function.
3253 (build_array_notation_expr): Likewise.
3254 (fix_conditional_array_notations_1): Likewise.
3255 (fix_array_notation_expr): Likewise.
3256 (fix_array_notation_call_expr): Likewise.
3257
3258 2013-06-18 Marek Polacek <polacek@redhat.com>
3259
3260 PR c/57630
3261 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3262
3263 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3264
3265 * c-array-notation.c (build_array_notation_expr): Reject array notation
3266 mismatch between LHS and RHS even inside a call_expr. Also, removed
3267 a couple while statements that were dead code.
3268
3269 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3270
3271 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3272 excessive precision expressions in function parameters. Also removed
3273 couple unwanted while statements.
3274
3275 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3276
3277 * c-array-notation.c (expand_array_notation_exprs): Added
3278 ARRAY_NOTATION_REF case.
3279
3280 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3281
3282 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3283 function to c-family/array-notation-common.c.
3284 (is_cilkplus_reduce_builtin): Likewise.
3285 (find_rank): Likewise.
3286 (extract_array_notation_exprs): Likewise.
3287 (replace_array_notations): Likewise.
3288 (find_inv_trees): Likewise.
3289 (replace_inv_trees): Likewise.
3290 (contains_array_notation_expr): Likewise.
3291 (find_correct_array_notation_type): Likewise.
3292 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3293 (struct inv_list): Moved this to c-family/array-notation-common.c.
3294 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3295
3296 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3297
3298 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3299 reduction functions outside the for-loop. Added a check if the fundecl
3300 is non-NULL. Finally, removed an unwanted if-statement, and made the
3301 body unconditional.
3302
3303 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3304
3305 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3306 condition of the if-statement matches the rank of else-block and then-
3307 block when array notations are used.
3308 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3309 expression after the entire function body is parsed.
3310 (c_parser_expr_no_commas): Delayed creating array notation expressions
3311 to the end of function parsing.
3312 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3313 whole if-statement instead of just the condition.
3314 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3315
3316 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3317
3318 PR c/57474
3319 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3320 array to NULL_TREE if they are unused. Also added a check for the
3321 field to be NULL before its fields are used in future.
3322
3323 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3324
3325 PR bootstrap/57450
3326 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3327 (build_array_notation_expr): Likewise.
3328
3329 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3330
3331 * c-typeck.c (build_array_ref): Added a check to see if array's
3332 index is greater than one. If true, then emit an error.
3333 (build_function_call_vec): Exclude error reporting and checking
3334 for builtin array-notation functions.
3335 (convert_arguments): Likewise.
3336 (c_finish_return): Added a check for array notations as a return
3337 expression. If true, then emit an error.
3338 (c_finish_loop): Added a check for array notations in a loop
3339 condition. If true then emit an error.
3340 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3341 (build_binary_op): Added a check for array notation expr inside
3342 op1 and op0. If present, we call another function to find correct
3343 type.
3344 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3345 * c-parser.c (c_parser_compound_statement): Check if array
3346 notation code is used in tree, if so, then transform them into
3347 appropriate C code.
3348 (c_parser_expr_no_commas): Check if array notation is used in LHS
3349 or RHS, if so, then build array notation expression instead of
3350 regular modify.
3351 (c_parser_postfix_expression_after_primary): Added a check for
3352 colon(s) after square braces, if so then handle it like an array
3353 notation. Also, break up array notations in unary op if found.
3354 (c_parser_direct_declarator_inner): Added a check for array
3355 notation.
3356 (c_parser_compound_statement): Added a check for array notation in
3357 a stmt. If one is present, then expand array notation expr.
3358 (c_parser_if_statement): Likewise.
3359 (c_parser_switch_statement): Added a check for array notations in
3360 a switch statement's condition. If true, then output an error.
3361 (c_parser_while_statement): Similarly, but for a while.
3362 (c_parser_do_statement): Similarly, but for a do-while.
3363 (c_parser_for_statement): Similarly, but for a for-loop.
3364 (c_parser_unary_expression): Check if array notation is used in a
3365 pre-increment or pre-decrement expression. If true, then expand
3366 them.
3367 (c_parser_array_notation): New function.
3368 * c-array-notation.c: New file.
3369 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3370
3371 2013-05-23 Mike Stump <mikestump@comcast.net>
3372
3373 * c-typeck.c (convert_for_assignment): Handle references to memory
3374 spaces better.
3375
3376 2013-05-16 Jason Merrill <jason@redhat.com>
3377
3378 * Make-lang.in (cc1$(exeext)): Use link mutex.
3379
3380 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3381
3382 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3383 to simply use OPT_Wpointer_arith.
3384 (build_unary_op): Likewise.
3385
3386 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3387
3388 PR c/19449
3389 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3390 argument. If set, or it temporarily for parsing of the first
3391 argument into force_folding_builtin_constant_p.
3392 (c_parser_postfix_expression): Adjust callers.
3393
3394 2013-03-21 Richard Biener <rguenther@suse.de>
3395
3396 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3397 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3398
3399 2013-02-12 Marek Polacek <polacek@redhat.com>
3400
3401 PR c/44938
3402 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3403 origtypes to NULL.
3404
3405 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3406
3407 PR c/56078
3408 * c-typeck.c (set_nonincremental_init_from_string): If
3409 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3410 returned false.
3411 (process_init_element): Likewise.
3412
3413 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3414
3415 PR c++/55619
3416 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3417 argument, don't call default_function_array_conversion
3418 nor c_fully_fold here.
3419 (c_parser_asm_statement): Adjust callers.
3420 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3421 and outputs here, and call default_function_array_conversion
3422 on inputs that don't need to be addressable.
3423
3424 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3425
3426 PR c/39464
3427 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3428 warning require that both c_common_unsigned_type as well as
3429 c_common_signed_type is the same for both mvl and mvr types.
3430
3431 2012-11-16 Diego Novillo <dnovillo@google.com>
3432
3433 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3434
3435 * c-common.c: Use new vec API in vec.h.
3436 * c-common.h: Likewise.
3437 * c-gimplify.c: Likewise.
3438 * c-pragma.c: Likewise.
3439 * c-pretty-print.c: Likewise.
3440 * c-pretty-print.h: Likewise.
3441 * c-semantics.c: Likewise.
3442 * c-decl.c: Likewise.
3443 * c-parser.c: Likewise.
3444 * c-tree.h: Likewise.
3445 * c-typeck.c: Likewise.
3446
3447 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3448
3449 PR c++/54930
3450 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3451
3452 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3453
3454 PR c/53066
3455 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3456 shadows a function, unless the variable is a function or a
3457 pointer-to-function.
3458
3459 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3460
3461 PR c/54381
3462 * c-parser.c (struct c_tree_loc_pair): Removed.
3463 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3464 add location_t * and tree * arguments, fill in array of 3
3465 sizeof_arg trees and corresponding locs.
3466 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3467 c_parser_expr_list callers.
3468 (c_parser_postfix_expression_after_primary): Likewise. Pass
3469 array of 3 sizeof_arg trees and locs (corresponding to first
3470 3 arguments) to sizeof_pointer_memaccess_warning.
3471
3472 2012-10-09 Lawrence Crowl <crowl@google.com>
3473
3474 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3475 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3476 hash table.
3477
3478 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3479
3480 PR c++/54194
3481 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3482 call.
3483
3484 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3485
3486 PR c++/54427
3487 * c-typeck.c: Include c-common.h.
3488 (enum stv_conv): Moved to c-common.h.
3489 (scalar_to_vector): Moved to c-common.c.
3490 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3491 * Make-lang.in: c-typeck.c depends on c-common.h.
3492
3493 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3494
3495 * c-decl.c (c_write_global_declarations): Fix handling of
3496 -fdump-ada-spec*.
3497
3498 2012-09-30 Sharad Singhai <singhai@google.com>
3499
3500 * c-decl.c (c_write_global_declarations): Use a different method
3501 to determine if the dump has ben initialized.
3502
3503 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3504
3505 PR c/54552
3506 * c-typeck.c (c_cast_expr): When casting to a type requiring
3507 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3508 c_fully_fold first.
3509
3510 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3511
3512 PR c/54103
3513 * c-typeck.c (build_unary_op): Pass original argument of
3514 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3515 any C_MAYBE_CONST_EXPR, if it has integer operands.
3516 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3517 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3518 to c_objc_common_truthvalue_conversion, then remove any
3519 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3520 c_objc_common_truthvalue_conversion not
3521 c_common_truthvalue_conversion.
3522 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3523 call note_integer_operands for arguments with integer operands
3524 that are not integer constants.
3525
3526 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3527
3528 PR c/54559
3529 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3530 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3531
3532 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3533
3534 PR c/54428
3535 * c-convert.c (convert): Don't call fold_convert_loc if
3536 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3537 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3538 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3539
3540 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3541
3542 PR c/54355
3543 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3544 for nested and empty_ok arguments in the call to
3545 c_parser_declaration_or_fndef.
3546
3547 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3548
3549 * c-tree.h (c_last_sizeof_arg): Declare.
3550 * c-parser.c (struct c_tree_loc_pair): New type.
3551 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3552 non-NULL.
3553 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3554 (c_parser_postfix_expression_after_primary): Likewise. Call
3555 sizeof_pointer_memaccess_warning if needed.
3556 (sizeof_ptr_memacc_comptypes): New function.
3557 * c-typeck.c (c_last_sizeof_arg): New global variable.
3558 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3559
3560 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3561
3562 * c-lang.h (lang_decl): Add variable_size GTY option.
3563
3564 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3565
3566 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3567 * Make-lang.in: Fix dependencies.
3568
3569 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3570
3571 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3572 and add language Makefile hooks.
3573 * config-lang.in: New file.
3574 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3575 add the required "normal" config-lang.in rules.
3576 * c-lang.h: Moved from gcc/ to here.
3577 * c-tree.h: Likewise.
3578 * c-objc-common.c: Likewise.
3579 * c-objc-common.h: Likewise.
3580 * c-typeck.c: Likewise.
3581 * c-convert.c: Likewise.
3582 * c-lang.c: Likewise.
3583 * c-aux-info.c: Likewise.
3584 * c-errors.c: Likewise.
3585 * gccspec.c: Likewise.
3586 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3587 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3588 \f
3589 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3590
3591 Copying and distribution of this file, with or without modification,
3592 are permitted in any medium without royalty provided the copyright
3593 notice and this notice are preserved.