1 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4 warn_for_memset instead of warning directly here.
6 2016-04-26 Marek Polacek <polacek@redhat.com>
9 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
11 (c_parser_for_statement): ... here.
12 (c_parser_if_statement): Use it.
13 (c_parser_switch_statement): Use it.
14 (c_parser_while_statement): Use it.
17 * c-decl.c (pushdecl): Pass LOCUS down to warning.
19 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
22 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
23 instead of c_finish_cilk_clauses.
24 * c-tree.h (c_finish_omp_clauses): Add new default argument.
25 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
26 floating-point variables in the linear clause for Cilk Plus.
28 2016-04-18 Michael Matz <matz@suse.de>
30 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
31 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
33 2016-04-15 Marek Polacek <polacek@redhat.com>
36 * c-typeck.c (build_unary_op): Pass location down to error and
39 2016-04-15 Jakub Jelinek <jakub@redhat.com>
42 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
44 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
45 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
46 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
47 Adjust c_parser_pragma callers.
48 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
50 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
52 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
53 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
54 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
55 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
56 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
57 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
58 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
59 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
61 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
62 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
65 2016-04-13 Marek Polacek <polacek@redhat.com>
68 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
70 (c_parser_statement): Likewise.
71 (c_parser_c99_block_statement): Likewise.
72 (c_parser_while_statement): Likewise.
73 (c_parser_for_statement): Likewise.
74 (c_parser_if_body): Don't set IF_P here.
75 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
76 about dangling else here.
77 * c-tree.h (c_finish_if_stmt): Adjust declaration.
78 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
79 warn about dangling else here.
81 2016-04-04 Marek Polacek <polacek@redhat.com>
84 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
86 2016-03-31 Marek Polacek <polacek@redhat.com>
89 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
91 2016-03-18 David Malcolm <dmalcolm@redhat.com>
94 * c-parser.c (c_parser_postfix_expression): Set the source range
95 for uses of "__builtin_types_compatible_p".
97 2016-03-17 Jakub Jelinek <jakub@redhat.com>
100 * c-typeck.c (composite_type): Don't count void_list_node
101 into len, if the list is terminated by void_list_node, start
102 with void_list_node instead of NULL for newargs. Stop
105 2016-03-16 Marek Polacek <polacek@redhat.com>
108 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
109 nested functions returning VM types.
111 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
113 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
114 when calling c_finish_omp_clauses.
116 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
119 * c-decl.c (get_parm_info): Don't queue implicit function declarations
122 2016-03-04 Marek Polacek <polacek@redhat.com>
125 * c-parser.c (c_parser_postfix_expression): Call
126 c_parser_cast_expression rather than c_parser_postfix_expression.
128 2016-03-01 Jakub Jelinek <jakub@redhat.com>
132 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
133 of incomplete decls to error_mark_node.
135 2016-02-24 Marek Polacek <polacek@redhat.com>
138 * c-decl.c (finish_decl): Don't update the copy of the type of a
141 2016-02-23 Jakub Jelinek <jakub@redhat.com>
144 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
145 in id_kind reclassification.
147 2016-02-16 Jakub Jelinek <jakub@redhat.com>
150 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
152 2016-02-16 James Norris <jnorris@codesourcery.com>
155 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
157 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
159 * c-decl.c (build_null_declspecs): Zero the entire struct.
162 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
163 callers changed. If nested_p is true, use it to call
164 finish_implicit_inits.
165 * c-tree.h (finish_implicit_inits): Declare.
166 * c-typeck.c (finish_implicit_inits): New function. Move code
168 (push_init_level): ... here.
169 (set_designator, process_init_element): Call finish_implicit_inits.
171 2016-02-11 Jakub Jelinek <jakub@redhat.com>
174 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
175 arguments for -Waddress warning.
177 2016-02-04 Jakub Jelinek <jakub@redhat.com>
180 * c-decl.c (finish_enum): When honoring mode attribute,
181 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
183 2016-01-29 Jakub Jelinek <jakub@redhat.com>
186 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
187 all type variants, not just TYPE_MAIN_VARIANT.
189 2016-01-27 Jakub Jelinek <jakub@redhat.com>
192 * c-decl.c (c_write_global_declarations_1): Warn with
193 warn_unused_function if static prototype without definition
196 2016-01-27 Marek Polacek <polacek@redhat.com>
199 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
200 to unsigned, if needed. Add -Wsign-compare warning.
202 2016-01-26 Jakub Jelinek <jakub@redhat.com>
204 PR tree-optimization/69483
205 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
207 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
210 * c-tree.h (incomplete_record_decls): Declare.
211 * c-parser.c (incomplete_record_decls): Define.
212 (c_parser_translation_unit): Iterate through incomplete_record_decls and
213 report error if any decl has zero size.
214 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
215 or enum type to incomplete_record_decls.
217 2016-01-14 Tom de Vries <tom@codesourcery.com>
219 PR tree-optimization/68773
220 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
223 2016-01-14 Marek Polacek <polacek@redhat.com>
226 * c-decl.c (grokdeclarator): Provide more information for invalid
229 2016-01-06 David Malcolm <dmalcolm@redhat.com>
231 * c-parser.c (c_parser_unary_expression): For dereferences, build
232 a combined location before calling build_indirect_ref, so that
233 error reports cover the full range, manually updating the c_expr
236 2016-01-06 Marek Polacek <polacek@redhat.com>
239 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
240 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
243 2016-01-04 Jakub Jelinek <jakub@redhat.com>
245 Update copyright years.
247 2016-01-04 Marek Polacek <polacek@redhat.com>
250 * c-typeck.c (build_atomic_assign): Improve commentary. Add
251 optimization to use __atomic_fetch_* built-in if possible.
253 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
255 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
257 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
260 2015-12-22 Marek Polacek <polacek@redhat.com>
263 * c-typeck.c (build_component_ref): Warn when acessing elements of
264 atomic structures or unions.
266 2015-12-21 David Malcolm <dmalcolm@redhat.com>
268 * c-typeck.c: Include "gcc-rich-location.h".
269 (build_binary_op): In the two places that call binary_op_error,
270 create a gcc_rich_location and populate it with the location of
271 the binary op and its two operands.
273 2015-12-16 David Malcolm <dmalcolm@redhat.com>
275 * c-parser.c (c_parser_statement_after_labels): When calling
276 c_finish_return, Use the return expression's location if it has
277 one, falling back to the location of the first token within it.
278 * c-typeck.c (c_finish_return): When issuing warnings about
279 the incorrect presence/absence of a return value, issue a note
280 showing the declaration of the function.
282 2015-12-16 David Malcolm <dmalcolm@redhat.com>
284 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
286 (c_parser_peek_nth_token): New function.
287 (c_parser_peek_conflict_marker): New function.
288 (c_parser_error): Detect conflict markers and report them as such.
290 2015-12-16 David Malcolm <dmalcolm@redhat.com>
292 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
293 to preserve range information for the primary expression
294 in the call to c_parser_postfix_expression_after_primary.
296 2015-12-16 David Malcolm <dmalcolm@redhat.com>
298 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
299 expression location, falling back on the first token location,
300 rather than always using the latter.
302 2015-12-16 Marek Polacek <polacek@redhat.com>
305 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
308 2015-12-15 Marek Polacek <polacek@redhat.com>
311 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
314 2015-12-08 David Malcolm <dmalcolm@redhat.com>
316 * c-parser.c (c_parser_alignof_expression): Capture location of
317 closing parenthesis (if any), or of end of unary expression, and
318 use it to build a src_range for the expression.
320 2015-12-08 David Malcolm <dmalcolm@redhat.com>
323 * c-parser.c (c_parser_get_builtin_args): Add
324 "out_close_paren_loc" param, and write back to it.
325 (c_parser_postfix_expression): Capture the closing
326 parenthesis location for RID_CHOOSE_EXPR,
327 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
328 RID_BUILTIN_SHUFFLE and use it to set the source range
329 for such expressions; within RID_BUILTIN_COMPLEX set
330 the underlying location.
332 2015-12-07 Marek Polacek <polacek@redhat.com>
335 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
336 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
338 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
340 * c-tree.h (c_build_va_arg): Adjust prototype.
341 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
342 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
343 parameter, adjust throughout and issue an error if EXPR is a component
344 with reverse storage order.
346 2015-12-02 Jason Merrill <jason@redhat.com>
348 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
349 (c_fully_fold_internal, decl_constant_value_for_optimization):
350 Move from c-common.c.
351 * c-tree.h: Declare decl_constant_value_for_optimization.
352 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
354 2015-12-02 Joseph Myers <joseph@codesourcery.com>
357 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
358 following link from declarator to next declarator. Track original
359 qualified type and pass it to c_build_qualified_type.
360 * c-typeck.c (c_build_qualified_type): Add arguments
361 orig_qual_type and orig_qual_indirect.
363 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
365 * c-parser.c (c_parser_omp_clause_name)
366 (c_parser_oacc_all_clauses): Alphabetical sorting.
368 2015-12-02 Jakub Jelinek <jakub@redhat.com>
371 * c-decl.c (get_parm_info): Use b->locus instead of input_location
374 2015-12-01 Julian Brown <julian@codesourcery.com>
375 Cesar Philippidis <cesar@codesourcery.com>
376 James Norris <James_Norris@mentor.com>
378 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
379 (c_parser_oacc_clause_use_device): New function.
380 (c_parser_oacc_all_clauses): Add use_device support.
381 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
382 (c_parser_oacc_host_data): New function.
383 (c_parser_omp_construct): Add host_data support.
384 * c-tree.h (c_finish_oacc_host_data): Add prototype.
385 * c-typeck.c (c_finish_oacc_host_data): New function.
386 (c_finish_omp_clauses): Add use_device support.
388 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
391 * c-decl.c: Set TYPE_PACKED in variants.
393 2015-11-27 Martin Liska <mliska@suse.cz>
396 * c-array-notation.c (fix_builtin_array_notation_fn):
397 Use release_vec_vec instead of vec::release.
398 (build_array_notation_expr): Likewise.
399 (fix_conditional_array_notations_1): Likewise.
400 (fix_array_notation_expr): Likewise.
401 (fix_array_notation_call_expr): Likewise.
403 2015-11-27 Jakub Jelinek <jakub@redhat.com>
406 * c-parser.c (c_parser_compound_statement_nostart): If
407 last_label is true, use pragma_stmt instead of pragma_compound
408 as second c_parser_pragma argument.
409 (c_parser_omp_ordered, c_parser_omp_target_update,
410 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
411 false as second argument to c_parser_skip_to_pragma_eol after
412 diagnosing standalone directives used in pragma_stmt context.
414 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
416 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
417 with "if (ENABLE_OFFLOADING)".
419 2015-11-23 David Malcolm <dmalcolm@redhat.com>
422 * c-parser.c (c_parser_postfix_expression): Set up source ranges
423 for various Objective-C constructs: Class.name syntax,
424 @selector(), @protocol(), @encode(), and [] message syntax.
426 2015-11-20 David Malcolm <dmalcolm@redhat.com>
429 * c-typeck.c (should_suggest_deref_p): New function.
430 (build_component_ref): Special-case POINTER_TYPE when
431 generating a "not a structure of union" error message, and
432 suggest a "->" rather than a ".", providing a fix-it hint.
434 2015-11-19 David Malcolm <dmalcolm@redhat.com>
436 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
437 candidate into a new function, find_closest_identifier.
439 2015-11-19 Marek Polacek <polacek@redhat.com>
442 * c-typeck.c (parser_build_binary_op): Properly handle
443 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
445 2015-11-17 David Malcolm <dmalcolm@redhat.com>
447 * c-parser.c (set_c_expr_source_range): Bulletproof both
448 overloaded implementations against NULL expr->value.
449 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
451 (c_parser_unary_expression): Likewise when handling addresses of
453 (c_parser_postfix_expression): Likewise for statement expressions,
454 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
455 __builtin_va_arg, and for __builtin_offset_of.
456 (c_parser_postfix_expression_after_paren_type): Initialize expr's
457 src_range using the range of the braced initializer.
458 (c_parser_transaction_expression): Set src_range for "ret" to a
461 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
463 * c-parser.c (c_finish_omp_declare_simd): Look for
464 "simd" attribute as well. Update error message.
466 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
468 * c-parser.c (c_parser_omp_declare_target): Adjust.
470 2015-11-14 Jakub Jelinek <jakub@redhat.com>
472 * c-typeck.c (c_finish_omp_clauses): Don't mark
473 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
475 2015-11-14 Marek Polacek <polacek@redhat.com>
477 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
478 * c-typeck.c: Likewise.
480 2015-11-13 David Malcolm <dmalcolm@redhat.com>
482 * c-decl.c (warn_defaults_to): Pass line_table to
484 * c-errors.c (pedwarn_c99): Likewise.
485 (pedwarn_c90): Likewise.
486 * c-parser.c (set_c_expr_source_range): New functions.
487 (c_token::get_range): New method.
488 (c_token::get_finish): New method.
489 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
490 based on the range from the start of the LHS to the end of the
492 (c_parser_conditional_expression): Likewise, based on the range
493 from the start of the cond.value to the end of exp2.value.
494 (c_parser_binary_expression): Call set_c_expr_source_range on
495 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
496 (c_parser_cast_expression): Call set_c_expr_source_range on ret
497 based on the cast_loc through to the end of the expr.
498 (c_parser_unary_expression): Likewise, based on the
499 op_loc through to the end of op.
500 (c_parser_sizeof_expression) Likewise, based on the start of the
501 sizeof token through to either the closing paren or the end of
503 (c_parser_postfix_expression): Likewise, using the token range,
504 or from the open paren through to the close paren for
505 parenthesized expressions.
506 (c_parser_postfix_expression_after_primary): Likewise, for
507 various kinds of expression.
508 * c-tree.h (struct c_expr): Add field "src_range".
509 (c_expr::get_start): New method.
510 (c_expr::get_finish): New method.
511 (set_c_expr_source_range): New decls.
512 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
513 on ret for prefix unary ops.
514 (parser_build_binary_op): Likewise, running from the start of
515 arg1.value through to the end of arg2.value.
517 2015-11-13 Marek Polacek <polacek@redhat.com>
520 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
522 2015-11-13 David Malcolm <dmalcolm@redhat.com>
524 * c-typeck.c: Include spellcheck.h.
525 (lookup_field_fuzzy_find_candidates): New function.
526 (lookup_field_fuzzy): New function.
527 (build_component_ref): If the field was not found, try using
528 lookup_field_fuzzy and potentially offer a suggestion.
530 2015-11-12 James Norris <jnorris@codesourcery.com>
531 Joseph Myers <joseph@codesourcery.com>
533 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
534 (c_parser_omp_clause_name): Handle 'device_resident' clause.
535 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
536 and PRAGMA_OMP_CLAUSE_LINK.
537 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
538 and PRAGMA_OACC_CLAUSE_LINK.
539 (OACC_DECLARE_CLAUSE_MASK): New definition.
540 (c_parser_oacc_declare): New function.
542 2015-11-12 Marek Polacek <polacek@redhat.com>
545 * c-parser.c (c_parser_for_statement): Reclassify the token in
548 2015-11-11 Marek Polacek <polacek@redhat.com>
552 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
553 checking the size of an array.
555 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
557 * c-array-notation.c: Remove unused header files.
558 * c-aux-info.c: Likewise.
559 * c-convert.c: Likewise.
560 * c-decl.c: Likewise.
561 * c-errors.c: Likewise.
562 * c-lang.c: Likewise.
563 * c-objc-common.c: Likewise.
564 * c-parser.c: Likewise.
565 * c-typeck.c: Likewise.
566 * gccspec.c: Likewise.
568 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
569 Cesar Philippidis <cesar@codesourcery.com>
570 James Norris <jnorris@codesourcery.com>
571 Julian Brown <julian@codesourcery.com>
572 Nathan Sidwell <nathan@codesourcery.com>
575 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
577 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
578 (c_parser_pragma): Parse 'acc routine'.
579 (OACC_ROUTINE_CLAUSE_MARK): Define.
580 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
582 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
585 * c-typeck.c (c_finish_loop): For unconditional loops, set the
586 location of the backward-goto to the start of the loop body.
588 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
591 * c-parser.c (c_parser_while_statement): Finish the loop before
592 parsing ahead for misleading indentation.
593 (c_parser_for_statement): Likewise.
595 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
597 * c-decl.c (finish_struct): If the structure has reverse storage
598 order, rewrite the type of array fields with scalar component. Call
599 maybe_apply_pragma_scalar_storage_order on entry.
600 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
601 errors on bit-fields and reverse SSO here and not...
602 (c_mark_addressable): ...here.
603 (output_init_element): Adjust call to initializer_constant_valid_p.
604 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
606 2015-11-06 David Malcolm <dmalcolm@redhat.com>
608 * c-decl.c (warn_defaults_to): Update for change in signature
609 of diagnostic_set_info.
610 * c-errors.c (pedwarn_c99): Likewise.
611 (pedwarn_c90): Likewise.
612 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
613 for textinfo::set_location.
615 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
616 Thomas Schwinge <thomas@codesourcery.com>
617 James Norris <jnorris@codesourcery.com>
619 * c-parser.c (c_parser_omp_clause_name): Add support for
620 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
621 (c_parser_omp_clause_default): Add is_oacc argument. Handle
622 default(none) in OpenACC.
623 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
625 (c_parser_oacc_clause_tile): New function.
626 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
627 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
628 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
630 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
631 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
633 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
634 (c_parser_oacc_update): Update the error message for missing clauses.
635 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
636 and OMP_CLAUSE_INDEPENDENT.
638 2015-11-05 Marek Polacek <polacek@redhat.com>
641 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
642 deal with pre-evaluation on invalid types.
644 2015-11-05 Jakub Jelinek <jakub@redhat.com>
645 Ilya Verbin <ilya.verbin@intel.com>
647 * c-parser.c: Include context.h and gimple-expr.h.
648 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
649 monotonic together with nonmonotonic.
650 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
651 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
652 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
653 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
654 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
655 expressions on combined target teams before the target.
656 (c_parser_omp_declare_target): If decl has "omp declare target" or
657 "omp declare target link" attribute, and cgraph or varpool node already
658 exists, then set corresponding flags. Call c_finish_omp_clauses
659 in the parenthesized extended-list syntax case.
660 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
662 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
663 on OMP_CLAUSE_REDUCTION array sections.
664 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
665 into the constant offset, or for variable low-bound using
666 POINTER_PLUS_EXPR. For structure element based array sections use
667 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
668 (c_finish_omp_clauses): Drop generic_field_head, structure
669 elements are now always mapped even as array section bases,
670 diagnose same var in data sharing and mapping clauses. Diagnose if
671 linear step on declare simd is neither a constant nor a uniform
672 parameter. Look through POINTER_PLUS_EXPR for array section
673 reductions. Diagnose the same var or function appearing multiple
674 times on the same directive. Fix up wording for the to clause if t
675 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
676 modifier on kinds other than dynamic or guided or nonmonotonic
677 modifier together with ordered clause.
679 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
680 Chung-Lin Tang <cltang@codesourcery.com>
682 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
684 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
686 * c-array-notation.c: Reorder #include's and remove duplicates.
687 * c-aux-info.c: Likewise.
688 * c-convert.c: Likewise.
689 * c-decl.c: Likewise.
690 * c-errors.c: Likewise.
691 * c-lang.c: Likewise.
692 * c-objc-common.c: Likewise.
693 * c-parser.c: Likewise.
694 * c-typeck.c: Likewise.
696 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
699 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
700 after calling build_qualified_type.
702 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
703 Thomas Schwinge <thomas@codesourcery.com>
704 James Norris <jnorris@codesourcery.com>
705 Joseph Myers <joseph@codesourcery.com>
706 Julian Brown <julian@codesourcery.com>
707 Bernd Schmidt <bschmidt@redhat.com>
709 * c-parser.c (c_parser_oacc_shape_clause): New.
710 (c_parser_oacc_simple_clause): New.
711 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
712 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
714 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
715 James Norris <jnorris@codesourcery.com>
716 Cesar Philippidis <cesar@codesourcery.com>
720 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
721 parameters, and handle these. Adjust all users.
722 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
724 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
726 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
728 (c_finish_omp_construct): Declare function.
729 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
730 Merge functions into...
731 (c_finish_omp_construct): ... this new function.
733 2015-10-22 Richard Biener <rguenther@suse.de>
735 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
736 before folding a MINUS_EXPR.
738 2015-10-21 Marek Polacek <polacek@redhat.com>
741 * c-decl.c (start_function): Warn about vararg functions without
744 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
746 * c-typeck.c (build_conditional_expr): Use boolean vector
747 type for vector comparison.
748 (build_vec_cmp): New.
749 (build_binary_op): Use build_vec_cmp for comparison.
751 2015-10-20 Marek Polacek <polacek@redhat.com>
753 * c-parser.c (is_cilkplus_vector_p): Don't define here.
755 2015-10-20 Marek Polacek <polacek@redhat.com>
758 * c-parser.c (c_parser_attributes): Break out of the loop if the
759 token after an attribute isn't a comma.
761 2015-10-13 Jakub Jelinek <jakub@redhat.com>
762 Aldy Hernandez <aldyh@redhat.com>
764 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
765 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
766 (c_parser_omp_variable_list): Handle structure elements for
767 map, to and from clauses. Handle array sections in reduction
768 clause. Formatting fixes.
769 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
771 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
772 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
773 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
774 c_parser_omp_clause_is_device_ptr): New functions.
775 (c_parser_omp_clause_ordered): Parse optional parameter.
776 (c_parser_omp_clause_reduction): Handle array reductions.
777 (c_parser_omp_clause_schedule): Parse optional simd modifier.
778 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
780 (c_parser_omp_clause_linear): Parse linear clause modifiers.
781 (c_parser_omp_clause_depend_sink): New function.
782 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
783 (c_parser_omp_clause_map): Parse release/delete map kinds and
784 optional always modifier.
785 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
786 and c_finish_omp_clauses callers.
787 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
788 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
789 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
790 (OMP_CRITICAL_CLAUSE_MASK): Define.
791 (c_parser_omp_critical): Parse critical clauses.
792 (c_parser_omp_for_loop): Handle doacross loops, adjust
793 c_finish_omp_for and c_finish_omp_clauses callers.
794 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
795 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
796 (OMP_FOR_CLAUSE_MASK): Add linear clause.
797 (c_parser_omp_for): Disallow ordered clause when combined with
798 distribute. Disallow linear clause when combined with distribute
799 and not combined with simd.
800 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
801 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
802 parse clauses and if depend clause is found, don't parse a body.
803 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
804 Allow target parallel without for after it.
805 (OMP_TASK_CLAUSE_MASK): Add priority clause.
806 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
807 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
809 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
810 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
811 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
812 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
814 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
815 defaultmap and is_device_ptr clauses.
816 (c_parser_omp_target): Parse target parallel and target simd. Set
817 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
818 and target exit data. Diagnose invalid map kinds.
819 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
820 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
822 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
824 (OMP_TASKLOOP_CLAUSE_MASK): Define.
825 (c_parser_omp_taskloop): New function.
826 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
827 handle PRAGMA_OMP_TASKLOOP.
828 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
829 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
830 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
831 Add IS_OMP argument, handle structure element bases, diagnose
832 bitfields, pass IS_OMP recursively, diagnose known zero length
833 array sections in depend clauses, handle array sections in reduction
834 clause, diagnose negative length even for pointers.
835 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
836 types, pass IS_OMP down to handle_omp_array_sections_1, handle
837 array sections in reduction clause, set
838 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
839 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
840 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
841 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
843 2015-10-06 Marek Polacek <polacek@redhat.com>
845 * c-parser.c (c_parser_statement_after_labels): Use
846 protected_set_expr_location.
847 (c_parser_omp_clause_num_gangs): Likewise.
848 (c_parser_omp_clause_num_threads): Likewise.
849 (c_parser_omp_clause_num_workers): Likewise.
850 (c_parser_omp_clause_vector_length): Likewise.
851 (c_parser_omp_clause_num_teams): Likewise.
852 (c_parser_omp_clause_thread_limit): Likewise.
853 * c-typeck.c (build_c_cast): Likewise.
854 (c_cast_expr): Likewise.
856 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
858 * c-typeck.c (c_tree_equal): Use real_equal instead of
861 2015-10-04 Jason Merrill <jason@redhat.com>
863 * c-parser.c (c_lex_one_token): Handle @synchronized.
864 * c-decl.c (match_builtin_function_types): A declaration of a built-in
865 can change whether the function is transaction_safe.
867 2015-10-02 Marek Polacek <polacek@redhat.com>
870 * c-typeck.c (convert_for_assignment): Use the expansion point
873 2015-10-02 Marek Polacek <polacek@redhat.com>
876 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
877 and pass it down to c_parser_if_statement.
878 (c_parser_else_body): Add CHAIN parameter and pass it down to
879 c_parser_statement_after_labels.
880 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
881 duplicated if-else-if conditions.
883 2015-10-01 Marek Polacek <polacek@redhat.com>
885 * c-typeck.c (convert_for_assignment): Improve commentary.
887 2015-09-30 Marek Polacek <polacek@redhat.com>
890 * c-typeck.c (c_finish_return): Use the expansion point location for
891 certain "return with value" warnings.
893 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
895 * c-parser.c (pragma_lex): Add loc argument.
897 2015-09-15 Marek Polacek <polacek@redhat.com>
900 * c-decl.c (tag_exists_p): New function.
901 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
902 struct/union/enum keywords are missing.
903 * c-tree.h (tag_exists_p): Declare.
905 2015-09-15 Marek Polacek <polacek@redhat.com>
907 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
908 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
909 Return NULL_TREE instead of 0.
910 (lookup_name): Return NULL_TREE instead of 0.
911 (lookup_name_in_scope): Likewise.
912 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
913 (parser_xref_tag): Use false instead of 0.
914 (start_struct): Use true instead of 1.
915 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
917 2015-09-14 Marek Polacek <polacek@redhat.com>
919 * c-typeck.c (set_nonincremental_init_from_string): Use
920 HOST_WIDE_INT_M1U when shifting a negative value.
922 2015-09-09 Mark Wielaard <mjw@redhat.com>
924 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
927 2015-09-10 Jakub Jelinek <jakub@redhat.com>
930 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
931 into OMP_FOR_PRE_BODY rather than before the loop.
933 2015-09-09 Jakub Jelinek <jakub@redhat.com>
936 * c-parser.c (c_parser_oacc_all_clauses,
937 c_parser_omp_all_clauses): Remove invalid clause from
938 list of clauses even if parser->error is set.
941 * c-parser.c (c_parser_omp_clause_aligned,
942 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
944 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
948 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
949 instead of c_parser_unary_expression. If the result is !lvalue_p,
950 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
952 2015-09-04 Marek Polacek <polacek@redhat.com>
955 * c-typeck.c (build_binary_op): Don't instrument static initializers.
957 2015-09-03 Martin Sebor <msebor@redhat.com>
960 * c-typeck.c (convert_arguments, parser_build_unary_op,
961 build_conditional_expr, c_cast_expr, convert_for_assignment,
962 build_binary_op, _objc_common_truthvalue_conversion): Call
964 (c_decl_implicit): Define.
966 2015-09-02 Marek Polacek <polacek@redhat.com>
969 * c-parser.c (c_parser_enum_specifier): Give a better error for
972 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
974 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
976 2015-08-12 Marek Polacek <polacek@redhat.com>
978 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
981 2015-08-03 Marek Polacek <polacek@redhat.com>
984 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
986 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
988 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
990 * c-parser.c (c_parser_if_body): Take token_indent_info
991 argument. Call warn_for_misleading_indentation even when the
992 body is a semicolon. Extract token_indent_infos corresponding
993 to the guard, body and next tokens. Adjust call to
994 warn_for_misleading_indentation accordingly.
995 (c_parser_else_body): Likewise.
996 (c_parser_if_statement): Likewise.
997 (c_parser_while_statement): Likewise.
998 (c_parser_for_statement): Likewise.
1000 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1001 Manuel López-Ibáñez <manu@gcc.gnu.org>
1003 * c-decl.c (get_parm_info): Remove static var. Update warning
1006 2015-07-27 Marek Polacek <polacek@redhat.com>
1010 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1012 2015-07-20 Marek Polacek <polacek@redhat.com>
1015 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1016 (build_binary_op): Warn about left shift overflows.
1018 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1020 * c-array-notation.c: Adjust includes for flags.h changes.
1021 * c-objc-common.c: Likewise.
1023 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1025 * c-array-notation.c: Adjust includes.
1026 * c-aux-info.c: Likewise.
1027 * c-convert.c: Likewise.
1028 * c-decl.c: Likewise.
1029 * c-errors.c: Likewise.
1030 * c-lang.c: Likewise.
1031 * c-objc-common.c: Likewise.
1032 * c-parser.c: Likewise.
1033 * c-typeck.c: Likewise.
1035 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1038 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1040 2015-06-29 Marek Polacek <polacek@redhat.com>
1043 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1044 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1045 about -Wswitch-bool here.
1046 (do_case): Update c_add_case_label call.
1047 (c_finish_case): Update c_do_switch_warnings call.
1049 2015-06-27 Marek Polacek <polacek@redhat.com>
1051 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1053 2015-06-26 Marek Polacek <polacek@redhat.com>
1055 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1057 * c-typeck.c (array_to_pointer_conversion): Likewise.
1058 (build_unary_op): Likewise.
1059 (c_finish_return): Likewise.
1061 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1063 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1064 * c-parser.c: Likewise.
1066 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1068 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1069 instead of pointer_hash.
1070 (detect_field_duplicates): Likewise.
1072 2015-06-25 Marek Polacek <polacek@redhat.com>
1074 * c-array-notation.c: Use VAR_P throughout.
1075 * c-decl.c: Likewise.
1076 * c-objc-common.c: Likewise.
1077 * c-parser.c: Likewise.
1078 * c-typeck.c: Likewise.
1080 2015-06-25 Marek Polacek <polacek@redhat.com>
1082 * c-decl.c: Use is_global_var throughout.
1083 * c-parser.c: Likewise.
1084 * c-typeck.c: Likewise.
1086 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1088 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1089 * c-aux-info.c: Likewise.
1090 * c-convert.c: Likewise.
1091 * c-decl.c: Likewise.
1092 * c-errors.c: Likewise.
1093 * c-lang.c: Likewise.
1094 * c-objc-common.c: Likewise.
1095 * c-parser.c: Likewise.
1096 * c-typeck.c: Likewise.
1098 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1101 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1104 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1106 * c-decl.c (pop_scope): Register the main translation unit
1107 through the new debug hook.
1109 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1111 * c-array-notation.c : Adjust include files.
1112 * c-aux-info.c : Likewise.
1113 * c-convert.c : Likewise.
1114 * c-decl.c : Likewise.
1115 * c-errors.c : Likewise.
1116 * c-lang.c : Likewise.
1117 * c-lang.h : Likewise.
1118 * c-objc-common.c : Likewise.
1119 * c-parser.c : Likewise.
1120 * c-typeck.c : Likewise.
1122 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1124 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1125 immediately clobber it.
1126 (c_write_global_declarations_1): Remove call to
1127 check_global_declaration_1.
1128 (c_write_global_declarations_2): Remove.
1129 (c_write_final_cleanups): Rename from c_write_global_declarations.
1130 Remove call to finalize_compilation_unit.
1131 Remove calls to debugging hooks.
1132 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1133 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1134 * c-tree.h: Remove c_write_global_declarations.
1136 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1138 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1139 * c-aux-info.c: Likewise.
1140 * c-convert.c: Likewise.
1141 * c-decl.c: Likewise.
1142 * c-errors.c: Likewise.
1143 * c-lang.c: Likewise.
1144 * c-objc-common.c: Likewise.
1145 * c-parser.c: Likewise.
1146 * c-typeck.c: Likewise.
1148 2015-06-04 Marek Polacek <polacek@redhat.com>
1151 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1154 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1156 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1157 Warn for empty struct.
1158 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1160 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1162 * c-decl.c (start_function): Call plugin before parsing.
1163 (finish_function): Call plugin after parsing.
1165 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1168 * c-decl.c (merge_decls): Merge DECL_COMMON.
1170 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1172 * Make-lang.in (check_gcc_pallelize): Define.
1174 2015-05-22 Marek Polacek <polacek@redhat.com>
1177 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1180 2015-05-21 Marek Polacek <polacek@redhat.com>
1182 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1185 2015-05-20 Marek Polacek <polacek@redhat.com>
1187 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1188 * c-typeck.c: Likewise.
1190 2015-05-19 Marek Polacek <polacek@redhat.com>
1192 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1194 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1197 * c-parser.c (c_parser_omp_for_loop): Don't add
1198 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1199 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1200 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1203 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1205 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1208 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1211 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1214 2015-05-14 Marek Polacek <polacek@redhat.com>
1218 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1221 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1223 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1224 to add a call to warn_for_misleading_indentation.
1225 (c_parser_else_body): Likewise, adding param "else_loc".
1226 (c_parser_if_statement): Check for misleading indentation.
1227 (c_parser_while_statement): Likewise.
1228 (c_parser_for_statement): Likewise.
1230 2015-05-08 Marek Polacek <polacek@redhat.com>
1233 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1234 (output_init_element): Likewise.
1236 2015-05-07 Marek Polacek <polacek@redhat.com>
1239 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1242 2015-04-30 Marek Polacek <polacek@redhat.com>
1244 * c-typeck.c (set_init_label): Call error_at instead of error and
1247 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1250 * c-typeck.c (c_build_va_arg): Clarify the error message.
1252 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1254 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1255 OMP_STANDALONE_CLAUSES.
1257 2015-04-28 Marek Polacek <polacek@redhat.com>
1259 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1261 2015-04-28 Marek Polacek <polacek@redhat.com>
1264 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1266 2015-04-25 Marek Polacek <polacek@redhat.com>
1269 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1272 2015-04-23 Marek Polacek <polacek@redhat.com>
1275 * c-decl.c (set_labels_context_r): New function.
1276 (store_parm_decls): Call it via walk_tree_without_duplicates.
1277 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1278 instead of create_tmp_var. Build TARGET_EXPR instead of
1280 (build_atomic_assign): Use create_tmp_var_raw instead of
1281 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1283 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1285 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1286 (c_parser_omp_target_update): Add missed %> to error_at ().
1288 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1291 * c-decl.c (c_default_pointer_mode): Remove definition.
1292 * c-tree.h (c_default_pointer_mode): Remove declaration.
1294 2015-03-27 Tobias Burnus <burnus@net-b.de>
1297 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1299 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1300 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1301 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1303 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1305 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1306 attribute for DECL_EXTERNAL VAR_DECLs.
1308 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1310 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1313 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1316 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1317 before preparing arguments to warn_logical_not_parentheses.
1319 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1322 * c-typeck.c (parser_build_binary_op): Don't warn for
1323 !!x == y or !b == y where b is _Bool.
1325 2015-03-09 Marek Polacek <polacek@redhat.com>
1327 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1328 * c-decl.c (grokdeclarator): Likewise.
1329 * c-typeck.c (build_binary_op): Likewise.
1331 2015-02-27 Marek Polacek <polacek@redhat.com>
1334 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1336 2015-02-14 Marek Polacek <polacek@redhat.com>
1339 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1340 declared through a typedef name.
1342 2015-02-13 Marek Polacek <polacek@redhat.com>
1345 * c-decl.c (grokdeclarator): Print also the type when giving
1346 the error message about array's incomplete element type.
1348 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1351 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1352 check in the POP macro.
1354 2015-02-09 Marek Polacek <polacek@redhat.com>
1357 * c-typeck.c (process_init_element): Don't always wrap
1358 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1359 initializing a range of elements.
1361 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1365 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1367 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1369 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1370 processing enum declaration.
1372 2015-01-29 Marek Polacek <polacek@redhat.com>
1375 * c-typeck.c (pop_init_level): If constructor_elements has
1376 exactly one element with integer_zerop value, set constructor_zeroinit
1377 to 1. Remove braces around warning_init call.
1379 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1382 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1383 of FUNCTION_DECLs with error_mark_node.
1385 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1388 * c-typeck.c (convert_arguments): Return -1 if there are
1389 error_args, even if we've diagnosed too many arguments.
1391 2015-01-21 Richard Biener <rguenther@suse.de>
1394 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1395 for builtins the user declared correctly.
1397 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1398 Bernd Schmidt <bernds@codesourcery.com>
1399 Cesar Philippidis <cesar@codesourcery.com>
1400 James Norris <jnorris@codesourcery.com>
1401 Jakub Jelinek <jakub@redhat.com>
1402 Ilmir Usmanov <i.usmanov@samsung.com>
1404 * c-parser.c: Include "gomp-constants.h".
1405 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1406 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1407 Use OMP_CLAUSE_SET_MAP_KIND.
1408 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1409 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1410 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1411 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1412 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1413 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1414 "copyout", "create", "delete", "deviceptr", "gang", "host",
1415 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1416 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1417 "present_or_create", "pcreate", "seq", "self", "vector",
1418 "vector_length", "wait", "worker".
1419 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1420 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1421 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1422 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1423 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1424 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1425 (c_parser_oacc_data_clause_deviceptr)
1426 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1427 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1428 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1429 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1430 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1431 (c_parser_oacc_parallel, c_parser_oacc_update)
1432 (c_parser_oacc_wait): New functions.
1433 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1434 (c_finish_oacc_data): New prototypes.
1435 * c-typeck.c: Include "gomp-constants.h".
1436 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1437 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1438 OMP_CLAUSE_SET_MAP_KIND.
1439 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1440 (c_finish_oacc_data): New functions.
1441 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1442 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1443 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1444 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1445 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1446 GOMP_MAP_FORCE_DEVICEPTR.
1448 2015-01-09 Michael Collison <michael.collison@linaro.org>
1450 * c-array-notation.c: Include hash-set.h, machmode.h,
1451 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1452 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1453 * c-aux-info.c: Ditto.
1454 * c-convert.c: Ditto.
1456 * c-errors.c: Ditto.
1457 * c-lang.c: Dittoxs.
1458 * c-objc-common.c: Ditto.
1459 * c-parser.c: Ditto.
1460 * c-typeck.c: Include hash-set.h, machmode.h,
1461 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1462 fold-const.h, wide-int.h, inchash.h, real.h and
1463 fixed-value.h due to flattening of tree.h.
1465 2015-01-07 Marek Polacek <polacek@redhat.com>
1468 * c-typeck.c (process_init_element): Disallow initialization of
1469 a flexible array member with a string constant if the structure
1472 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1475 * c-typeck.c (convert_for_assignment, c_finish_return): For
1476 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1477 types also set in_late_binary_op around convert call.
1478 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1479 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1480 result on expr as last argument to ubsan_instrument_float_cast,
1481 if in_late_binary_op, don't use c_save_expr but save_expr.
1483 Update copyright years.
1485 2015-01-05 Marek Polacek <polacek@redhat.com>
1488 * c-typeck.c (build_array_ref): Pass loc down to
1489 warn_array_subscript_with_type_char.
1491 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1493 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1494 (common-pointer-type): For pointers to arrays take qualifiers from
1496 (build_conditional_expr): Add warnings for lost qualifiers.
1497 (comp-target-types): Allow pointers to arrays with different qualifiers.
1498 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1499 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1500 to PEDWARN_FOR_QUALIFIERS.
1502 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1505 * c-convert.c: Include ubsan.h.
1506 (convert): For real -> integral casts and
1507 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1508 instead instrument the float cast directly.
1510 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1512 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1513 c_finish_stmt_expr): Remove NULL last argument from
1514 create_tmp_var_raw and create_tmp_var calls.
1515 * c-array-notation.c (fix_builtin_array_notation_fn,
1516 build_array_notation_expr, fix_conditional_array_notations_1,
1517 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1519 2014-11-28 Marek Polacek <polacek@redhat.com>
1522 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1523 convert the right operand to integer type.
1525 2014-11-25 Marek Polacek <polacek@redhat.com>
1528 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1529 for inline functions.
1531 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1534 * c-typeck.c (build_array_ref): Adjust
1535 convert_vector_to_pointer_for_subscript caller. If it returns true,
1536 call non_lvalue_loc on the result.
1538 2014-11-11 Richard Biener <rguenther@suse.de>
1540 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1543 2014-11-10 Andi Kleen <ak@linux.intel.com>
1546 * c-parser.c (c_parser_statement_after_labels): Call
1548 (c_parser_if_statement): Dito.
1549 (c_parser_switch_statement): Dito.
1550 (c_parser_while_statement): Dito.
1551 (c_parser_do_statement): Dito.
1552 (c_parser_for_statement): Dito.
1553 * c-typeck.c (c_finish_loop): Dito.
1555 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1557 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1558 OPT_Wshift_count_overflow in the warnings.
1560 2014-10-30 Marek Polacek <polacek@redhat.com>
1562 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1563 print the stripped version as well, if they're not the same.
1565 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1567 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1570 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1572 * c-decl.c: Adjust include files.
1573 * c-parser.c: Ditto.
1575 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1576 Tom Tromey <tromey@redhat.com>
1578 * c-tree.h (enum c_oracle_request): New.
1579 (c_binding_oracle_function): New typedef.
1580 (c_binding_oracle, c_pushtag, c_bind): Declare.
1581 * c-decl.c (c_binding_oracle): New global.
1582 (I_SYMBOL_CHECKED): New macro.
1583 (i_symbol_binding): New function.
1584 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1585 (I_TAG_CHECKED): New macro.
1586 (i_tag_binding): New function.
1587 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1588 (I_LABEL_CHECKED): New macro.
1589 (i_label_binding): New function.
1590 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1591 (c_print_identifier): Save and restore c_binding_oracle.
1592 (c_pushtag, c_bind): New functions.
1594 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1596 * c-typeck.c: Adjust include files.
1598 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1601 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1602 initialization here...
1603 (c_initialize_diagnostics): ... but here. Set defaults after
1604 building pretty-printer.
1606 2014-10-23 Marek Polacek <polacek@redhat.com>
1609 * c-decl.c (pop_scope): Don't print warning in external_scope.
1611 2014-10-19 Marek Polacek <polacek@redhat.com>
1614 * c-typeck.c (output_init_element): Allow initializing objects with
1615 static storage duration with compound literals even in C99 and add
1618 2014-10-17 Marek Polacek <polacek@redhat.com>
1621 * c-typeck.c (digest_init): Allow initializing objects with static
1622 storage duration with compound literals even in C99 and add pedwarn
1625 2014-10-17 Marek Polacek <polacek@redhat.com>
1628 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1629 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1630 error multiple times. Print the type.
1632 2014-10-17 Marek Polacek <polacek@redhat.com>
1635 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1638 2014-10-17 Marek Polacek <polacek@redhat.com>
1640 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1641 (start_function): Use OPT_Wimplicit_int instead of 0.
1642 (store_parm_decls_oldstyle): Likewise.
1644 2014-10-17 Alan Modra <amodra@gmail.com>
1647 * c-decl.c (merge_decls): Don't merge section name or tls model
1648 to newdecl symtab node, instead merge to olddecl. Override
1649 existing olddecl section name. Set tls_model for all thread-local
1650 vars, not just OMP thread-private ones. Remove incorrect comment.
1652 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1654 * c-decl.c: Adjust include files.
1656 2014-10-14 DJ Delorie <dj@redhat.com>
1658 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1659 (c_token_starts_typename): Check all __intN, not just __int128.
1660 (c_token_starts_declspecs): Likewise.
1661 (c_parser_declspecs): Likewise.
1662 (c_parser_attribute_any_word): Likewise.
1663 (c_parser_objc_selector): Likewise.
1664 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1665 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1667 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1669 (finish_declspecs): Likewise.
1671 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1673 * c-parser.c (c_parser_all_labels): New function to replace
1675 (c_parser_statement): Call the new function.
1677 2014-10-09 Marek Polacek <polacek@redhat.com>
1680 * c-typeck.c (pop_init_level): Don't warn about initializing
1683 2014-10-07 Marek Polacek <polacek@redhat.com>
1686 * c-decl.c (header_for_builtin_fn): New function.
1687 (implicitly_declare): Suggest which header to include.
1689 2014-10-07 Marek Polacek <polacek@redhat.com>
1691 * c-convert.c (convert): Use error_operand_p.
1692 * c-typeck.c (require_complete_type): Likewise.
1693 (really_atomic_lvalue): Likewise.
1694 (digest_init): Likewise.
1695 (handle_omp_array_sections_1): Likewise.
1697 2014-10-03 Marek Polacek <polacek@redhat.com>
1700 * c-decl.c (pop_scope): Don't warn about "inline function declared
1701 but never defined" for functions marked with gnu_inline attribute.
1703 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1706 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1707 on low_bound and length.
1709 2014-09-24 Marek Polacek <polacek@redhat.com>
1713 * c-parser.c: Don't define CPP_KEYWORD.
1714 (c_parser_switch_statement): Pass original type to c_finish_case.
1715 * c-tree.h (c_finish_case): Update declaration.
1716 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1717 conditionally to c_do_switch_warnings.
1719 2014-09-03 Marek Polacek <polacek@redhat.com>
1722 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1725 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1726 Balaji V. Iyer <balaji.v.iyer@intel.com>
1727 Igor Zamyatin <igor.zamyatin@intel.com>
1729 * c-parser.c (c_parser_cilk_for): New function.
1730 (c_parser_cilk_grainsize): Likewise.
1731 (c_get_temp_regvar): Likewise.
1732 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1733 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1734 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1735 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1738 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1740 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1741 with using HOST_WIDE_INT without truncation to 'int'
1743 2014-08-22 Marek Polacek <polacek@redhat.com>
1746 * c-typeck.c (parser_build_binary_op): Adjust call to
1747 warn_logical_not_parentheses.
1749 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1752 * c-parser.c (c_parser_array_notation): Check for correct
1753 type of an array added.
1755 2014-08-19 Marek Polacek <polacek@redhat.com>
1758 * c-typeck.c (build_binary_op): If either operand of a comparison
1759 is a boolean expression, call maybe_warn_bool_compare.
1761 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1764 * c-typeck.c (build_c_cast): Do a conversion even when the
1765 TYPE_MAIN_VARIANTs are the same.
1767 2014-08-19 Marek Polacek <polacek@redhat.com>
1769 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1770 pedwarn_c99 instead of pedwarn.
1771 (grokfield): Likewise.
1772 (warn_defaults_to): New function.
1773 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1774 Unconditionally call pedwarn_c99 instead of pedwarn.
1775 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1776 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1777 check flag_isoc11 before.
1778 * c-errors.c (pedwarn_c99): Change the return type to bool.
1779 Handle -Wc99-c11-compat.
1780 * c-parser.c (disable_extension_diagnostics): Handle
1781 warn_c99_c11_compat.
1782 (restore_extension_diagnostics): Likewise.
1783 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1784 instead of pedwarn, don't check flag_isoc11 before.
1785 (c_parser_declspecs): Likewise.
1786 (c_parser_alignas_specifier): Likewise.
1787 (c_parser_alignof_expression): Likewise.
1788 (c_parser_generic_selection): Likewise.
1789 * c-tree.h (pedwarn_c99): Update declaration.
1790 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1793 2014-08-19 Marek Polacek <polacek@redhat.com>
1795 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1797 * c-errors.c: Include "opts.h".
1798 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1799 * c-parser.c (disable_extension_diagnostics): Handle negative value
1800 of warn_c90_c99_compat, too.
1801 (restore_extension_diagnostics): Likewise.
1802 (c_parser_compound_statement_nostart): Pass
1803 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1805 2014-08-12 Marek Polacek <polacek@redhat.com>
1807 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1809 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1811 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1813 2014-08-10 Marek Polacek <polacek@redhat.com>
1816 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1817 Call pedwarn_c90 instead of pedwarn.
1818 (check_bitfield_type_and_width): Likewise.
1819 (declspecs_add_qual): Likewise.
1820 (declspecs_add_type): Likewise.
1821 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1822 Adjust to only call pedwarn_c90.
1823 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1824 pedwarn_c90 instead of pedwarn.
1825 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1826 * c-parser.c (disable_extension_diagnostics): Handle
1827 warn_c90_c99_compat.
1828 (restore_extension_diagnostics): Likewise.
1829 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1830 pedwarn_c90 instead of pedwarn.
1831 (c_parser_initelt): Likewise.
1832 (c_parser_postfix_expression): Likewise.
1833 (c_parser_postfix_expression_after_paren_type): Likewise.
1834 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1835 * c-tree.h: Fix formatting.
1836 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1837 pedwarn_c90 instead of pedwarn.
1839 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1841 * c-typeck.c: Remove include of pointer-set.h.
1843 2014-08-07 Marek Polacek <polacek@redhat.com>
1845 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1847 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1849 * c-typeck.c: Use hash_map instead of pointer_map.
1851 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1853 * c-decl.c: Use hash_set instead of pointer_set.
1855 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1858 * c-array-notation.c (expand_array_notations): Handling
1861 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1864 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1867 2014-07-30 Tom Tromey <tromey@redhat.com>
1869 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1871 (really_start_incremental_init, push_init_level): Initialize
1873 (pop_init_level): Set global designator_depth.
1874 (process_init_element): Check for designated_init attribute.
1876 2014-07-20 Marek Polacek <polacek@redhat.com>
1879 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1880 (implicitly_declare): Pass location to implicit_decl_warning.
1882 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1885 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1886 If non-NULL, call c_parser_check_literal_zero.
1887 (c_parser_check_literal_zero): New function.
1888 (c_parser_postfix_expression_after_primary): Adjust
1889 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1891 2014-07-06 Marek Polacek <polacek@redhat.com>
1894 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1895 * c-tree.h (C_ARRAY_PARAMETER): Define.
1896 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1899 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
1900 Chen Gang <gang.chen.5i5j@gmail.com>
1902 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1905 2014-07-01 Marek Polacek <polacek@redhat.com>
1907 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1908 instead of 0 to WARN_FOR_ASSIGNMENT.
1910 2014-07-01 Marek Polacek <polacek@redhat.com>
1913 * c-typeck.c (convert_for_assignment): Pass
1914 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1916 2014-06-30 Marek Polacek <polacek@redhat.com>
1918 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1919 has no_sanitize_undefined attribute.
1921 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1924 * c-array-notation.c (fix_builtin_array_notation_fn):
1925 Check for 0 arguments in builtin call. Check that bultin argument is
1927 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1930 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1932 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1933 qualifiers in __auto_type for atomic types.
1934 (c_parser_typeof_specifier): Discard all type qualifiers in
1935 __typeof__ for atomic types.
1937 2014-06-25 Marek Polacek <polacek@redhat.com>
1940 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1941 the return expression to c_finish_return.
1943 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1945 * c-typeck.c (c_finish_omp_clauses): Make sure
1946 OMP_CLAUSE_LINEAR_STEP has correct type.
1948 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1952 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1954 * c-parser.c (c_parser_omp_for_loop): For
1955 #pragma omp parallel for simd move lastprivate clause from parallel
1956 to for rather than simd.
1958 2014-06-23 Marek Polacek <polacek@redhat.com>
1960 * c-typeck.c (parser_build_binary_op): Don't call
1961 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1963 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1965 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1966 * c-decl.c (merge_decls): Likewise.
1968 2014-06-09 Marek Polacek <polacek@redhat.com>
1971 * c-typeck.c (error_init): Call inform instead of error_at.
1972 (pedwarn_init): Call inform instead of pedwarn.
1973 (warning_init): Call inform instead of warning_at.
1975 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1977 * c-decl.c (merge_decls): Use set_decl_section_name.
1978 (duplicate_decls): Remove node if it exists.
1980 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1983 * c-typeck.c (push_init_level, process_init_element,
1984 pop_init_level): Correct check for zero initialization, move
1985 missing brace warning to respect zero initialization.
1987 2014-06-05 Marek Polacek <polacek@redhat.com>
1990 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1992 2014-06-05 Marek Polacek <polacek@redhat.com>
1995 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1996 on the left hand side operand of a comparison.
1998 2014-06-05 Marek Polacek <polacek@redhat.com>
2001 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2002 Print note only if the warning was printed.
2004 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2007 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2010 2014-06-03 Marek Polacek <polacek@redhat.com>
2013 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2015 * c-tree.h (c_start_case): Update.
2016 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2017 switch condition has boolean value.
2019 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2021 * c-decl.c: Include builtins.h.
2022 * c-parser.c: Likewise.
2024 2014-05-27 Marek Polacek <polacek@redhat.com>
2027 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2028 error and warning calls to error_at and warning_at. Pass location of
2029 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2030 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2031 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2033 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2036 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2037 function parameters.
2039 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2041 * c-decl.c (merge_decls): Preserve symtab node pointers.
2042 (duplicate_decls): Free new decl.
2044 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2046 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2049 * c-parser.c (c_parser_omp_target): Return bool values.
2051 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2053 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2054 num_teams_loc variable to num_thread_limit_loc.
2056 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2058 * c-array-notation.c (expand_array_notations): Use void_node
2059 instead of void_zero_node.
2061 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2063 * c-decl.c (finish_struct): Adjust.
2064 (finish_enum): Likewise.
2066 (record_inline_static): Likewise.
2067 (push_scope): Likewise.
2068 (make_label): Likewise.
2069 (lookup_label_for_goto): Likewise.
2070 (finish_struct): Likewise.
2071 (finish_enum): Likewise.
2072 (store_parm_decls): Likewise.
2073 (c_push_function_context): Likewise.
2074 * c-lang.h: Remove usage of variable_size gty attribute.
2075 * c-parser.c (c_parse_init): Adjust.
2076 (c_parse_file): Likewise.
2078 2014-05-13 Marek Polacek <polacek@redhat.com>
2081 * c-typeck.c (convert_for_assignment): Pass location to
2082 WARN_FOR_ASSIGNMENT instead of input_location.
2084 2014-05-10 Marek Polacek <polacek@redhat.com>
2086 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2087 maybe_warn_string_init.
2088 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2089 maybe_warn_string_init.
2090 * c-tree.h (maybe_warn_string_init): Update declaration.
2091 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2092 Call pedwarn_init with loc instead of with input_location.
2093 (digest_init): Pass init_loc to maybe_warn_string_init.
2094 (pop_init_level): Call pedwarn_init with loc instead of with
2096 (set_init_index): Likewise.
2097 (process_init_element): Likewise.
2099 2014-05-09 Marek Polacek <polacek@redhat.com>
2102 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2103 (c_parser_initelt): Pass location to set_init_label. Pass array index
2104 location to set_init_index.
2105 * c-tree.h (push_init_level): Update declaration.
2106 (pop_init_level): Likewise.
2107 (set_init_index): Likewise.
2108 (set_init_label): Likewise.
2109 * c-typeck.c (error_init): Add location parameter. Call error_at
2111 (digest_init): Pass init_loc to error_init.
2112 (really_start_incremental_init):
2113 (push_init_level): Add location parameter. Pass loc to pop_init_level
2115 (pop_init_level): Likewise.
2116 (set_designator): Add location parameter. Pass loc to pop_init_level,
2117 push_init_level, and error_init.
2118 (set_init_index): Add location parameter. Pass loc to error_init and
2120 (set_init_label): Likewise.
2121 (output_init_element): Pass loc to error_init.
2122 (process_init_element): Pass loc to error_init, pop_init_level,
2123 pedwarn_init, and push_init_level.
2125 2014-05-09 Marek Polacek <polacek@redhat.com>
2128 * c-parser.c (c_parser_attributes): Parse the arguments as an
2129 expression-list if the attribute takes identifier.
2131 2014-05-08 Marek Polacek <polacek@redhat.com>
2134 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2137 2014-05-08 Marek Polacek <polacek@redhat.com>
2140 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2143 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2144 Mike Stump <mikestump@comcast.net>
2145 Richard Sandiford <rdsandiford@googlemail.com>
2147 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2148 (finish_enum): Use wide-int interfaces.
2149 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2150 * c-typeck.c (build_c_cast): Likewise.
2151 (set_nonincremental_init_from_string): Likewise.
2152 (c_tree_equal): Likewise.
2154 2014-05-02 Marek Polacek <polacek@redhat.com>
2157 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2158 Return size_one_node when the type is not complete.
2159 (pointer_diff): Remove comment.
2160 (build_unary_op): Improve error messages.
2162 2014-05-02 Marek Polacek <polacek@redhat.com>
2164 * c-typeck.c (c_finish_return): Separate warning_at calls.
2166 2014-05-02 Marek Polacek <polacek@redhat.com>
2168 * c-tree.h (error_init): Remove declaration.
2169 (pedwarn_init): Likewise.
2170 * c-typeck.c (error_init): Make static and move above.
2171 (pedwarn_init): Likewise.
2172 (warning_init): Move above.
2173 (maybe_warn_string_init): Likewise.
2175 2014-05-01 Jeff Law <law@redhat.com>
2179 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2180 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2183 2014-05-02 Marek Polacek <polacek@redhat.com>
2186 * c-typeck.c (push_init_level): Set constructor_designated to
2187 p->designated for structures.
2189 2014-05-01 Marek Polacek <polacek@redhat.com>
2192 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2193 function-definition has an attribute after the declarator.
2195 2014-05-01 Marek Polacek <polacek@redhat.com>
2198 * c-typeck.c (warning_init): Add location_t parameter. Call
2199 warning_at instead of warning.
2200 (push_init_level): Pass input_location to warning_init.
2201 (add_pending_init): Add location_t parameter. Pass loc to
2203 (set_nonincremental_init): Pass input_location to add_pending_init.
2204 (set_nonincremental_init_from_string): Likewise.
2205 (output_init_element): Pass loc to warning_init and to
2208 2014-05-01 Marek Polacek <polacek@redhat.com>
2211 * c-typeck.c (c_finish_return): Distinguish between label and variable
2212 when warning about returning local address.
2214 2014-05-01 Marek Polacek <polacek@redhat.com>
2217 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2220 2014-05-01 Marek Polacek <polacek@redhat.com>
2223 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2224 instead of 0 to WARN_FOR_QUALIFIERS.
2226 2014-05-01 Marek Polacek <polacek@redhat.com>
2229 * c-typeck.c (default_conversion): Use better location for
2232 2014-04-30 Marek Polacek <polacek@redhat.com>
2234 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2235 also when SANITIZE_FLOAT_DIVIDE is on.
2237 2014-04-30 Marek Polacek <polacek@redhat.com>
2240 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2241 and pedwarn_init. Use loc insted of input_location.
2243 2014-04-30 Marek Polacek <polacek@redhat.com>
2246 * c-typeck.c (build_binary_op): Use location when warning about
2249 2014-04-25 Marek Polacek <polacek@redhat.com>
2252 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2253 always_inline/noinline and hot/cold attributes.
2255 2014-04-25 Marek Polacek <polacek@redhat.com>
2258 * c-parser.c (c_parser_initelt): Pass input_location to
2259 process_init_element.
2260 (c_parser_initval): Pass loc to process_init_element.
2261 * c-tree.h (process_init_element): Adjust declaration.
2262 * c-typeck.c (push_init_level): Pass input_location to
2263 process_init_element.
2264 (pop_init_level): Likewise.
2265 (set_designator): Likewise.
2266 (output_init_element): Add location_t parameter. Pass loc to
2268 (output_pending_init_elements): Pass input_location to
2269 output_init_element.
2270 (process_init_element): Add location_t parameter. Pass loc to
2271 output_init_element.
2273 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2275 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2276 atomic-clause, allow comma in between atomic-clause and
2279 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2282 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2283 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2285 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2288 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2289 create_tmp_var instead build_decl for creating temps.
2290 (build_array_notation_expr): Likewise.
2291 (fix_conditional_array_notations_1): Likewise.
2292 (fix_array_notation_expr): Likewise.
2293 (fix_array_notation_call_expr): Likewise.
2295 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2298 * c-tree.h (c_build_function_call_vec): New prototype.
2299 * c-typeck.c (build_function_call_vec): Don't call
2300 resolve_overloaded_builtin here.
2301 (c_build_function_call_vec): New wrapper function around
2302 build_function_call_vec. Call resolve_overloaded_builtin here.
2303 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2304 Call c_build_function_call_vec instead of build_function_call_vec.
2305 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2306 * c-decl.c (finish_decl): Likewise.
2308 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2311 * c-typeck.c: Use correct format string in cast-qual warning
2313 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2315 * c-decl.c (c_decl_attributes): Use
2316 lang_hooks.types.omp_mappable_type.
2317 * c-typeck.c (c_finish_omp_clauses): Likewise.
2319 2014-03-06 Marek Polacek <polacek@redhat.com>
2322 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2323 of checking tree code.
2325 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2327 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2328 (c_parser_parameter_declaration): Likewise.
2330 2014-02-19 Marek Polacek <polacek@redhat.com>
2333 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2334 Call mark_exp_read on exp.value.
2335 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2336 TREE_ADDRESSABLE on old instead of val.
2337 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2339 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2341 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2342 C_EXPR_APPEND by vec_safe_push.
2343 * c-tree.h (C_EXPR_APPEND): Remove.
2345 2014-01-31 Marek Polacek <polacek@redhat.com>
2348 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2349 build_function_call_vec.
2350 (build_function_call): Likewise.
2351 (build_atomic_assign): Likewise.
2352 (build_function_call_vec): Add arg_loc parameter. Use it.
2353 (convert_arguments): Likewise.
2354 (convert_for_assignment): Rename rhs_loc to expr_loc.
2355 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2356 (c_parser_objc_keywordexpr): Likewise.
2357 (c_parser_postfix_expression_after_primary): Call
2358 build_function_call_vec with expr_loc rather than op_loc.
2359 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2360 build_function_call_vec.
2361 (c_parser_expr_list): Add locations parameter. Fill it with locations
2362 of function arguments.
2363 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2365 2014-01-30 Marek Polacek <polacek@redhat.com>
2368 * c-typeck.c (build_function_call_vec): Use loc parameter.
2369 (convert_arguments): Add location parameter. Use it.
2370 (ep_convert_and_check): Likewise.
2371 (build_atomic_assign): Adjust convert_for_assignment call.
2372 (build_modify_expr): Likewise.
2373 (digest_init): Likewise.
2374 (c_finish_return): Likewise.
2375 (build_conditional_expr): Adjust ep_convert_and_check calls.
2376 (convert_for_assignment): Add rhs_loc parameter. Use it.
2377 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2380 2014-01-30 Richard Biener <rguenther@suse.de>
2383 * c-typeck.c (build_function_call_vec): Do not replace calls
2384 to a function via an incompatible type with a runtime abort.
2386 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2388 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2389 flag_enable_cilkplus with flag_cilkplus.
2390 (c_parser_direct_declarator_inner): Likewise.
2391 (c_parser_attribute_any_word): Likewise.
2392 (c_parser_attributes): Likewise.
2393 (c_parser_compound_statement): Likewise.
2394 (c_parser_statement_after_labels): Likewise.
2395 (c_parser_if_statement): Likewise.
2396 (c_parser_switch_statement): Likewise.
2397 (c_parser_do_statement): Likewise.
2398 (c_parser_for_statement): Likewise.
2399 (c_parser_unary_expression): Likewise.
2400 (c_parser_postfix_expression): Likewise.
2401 (c_parser_postfix_expression_after_primary): Likewise.
2402 (c_parser_postfix_expression_after_primary): Likewise.
2403 (c_parser_omp_clause_name): Likewise.
2404 (c_finish_omp_declare_simd): Likewise.
2405 (c_parser_cilk_verify_simd): Likewise.
2406 * c-typeck.c (build_array_ref): Likewise.
2407 (build_function_call_vec): Likewise.
2408 (convert_arguments): Likewise.
2409 (build_compound_expr): Likewise.
2410 (c_finish_return): Likewise.
2411 (c_finish_if_stmt): Likewise.
2412 (c_finish_loop): Likewise.
2413 (build_binary_op): Likewise.
2415 2014-01-23 Marek Polacek <polacek@redhat.com>
2418 * c-typeck.c (parser_build_binary_op): Use location instead of
2420 (build_binary_op): Pass location to shorten_compare.
2422 2014-01-23 Marek Polacek <polacek@redhat.com>
2425 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2428 2014-01-23 Marek Polacek <polacek@redhat.com>
2431 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2432 of a comma expression.
2433 (emit_side_effect_warnings): Likewise.
2435 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2438 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2439 function to use walk_tree and moved a lot of its functionality to
2440 expand_array_notations.
2441 (expand_array_notations): New function.
2443 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2445 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2446 attribute an attribute without value.
2448 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2451 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2452 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2454 2014-01-22 Marek Polacek <polacek@redhat.com>
2457 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2458 of remove_c_maybe_const_expr on op1 and op2.
2460 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2463 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2464 effects, preevaluate rhs using SAVE_EXPR first.
2466 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2469 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2470 statements with if-elseif statements.
2472 2014-01-06 Marek Polacek <polacek@redhat.com>
2475 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2476 defined bit-field types only in ISO C.
2478 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2480 Update copyright years
2482 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2484 * c-array-notation.c: Use the standard form for the copyright notice.
2486 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2488 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2489 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2490 field in parser is not empty. If not-empty, call the function
2491 c_parser_finish_omp_declare_simd.
2492 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2493 between SIMD-enabled functions and #pragma simd. Added new parameter.
2494 (c_parser_cilk_all_clauses): Modified the usage of the function
2495 c_parser_cilk_clause_vectorlength as mentioned above.
2496 (c_parser_cilk_simd_fn_vector_attrs): New function.
2497 (c_finish_cilk_simd_fn_tokens): Likewise.
2498 (is_cilkplus_vector_p): Likewise.
2499 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2500 "nomask," and "mask" strings in clause name.
2501 (c_parser_omp_all_clauses): Added 3 new case statements:
2502 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2503 PRAGMA_CILK_CLAUSE_NOMASK.
2504 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2505 check for vector attribute and if so call the function
2506 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2507 called the function c_finish_cilk_simd_fn_tokens.
2508 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2509 parser field is non-empty. If so, parse them as you would parse
2510 the omp declare simd pragma.
2511 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2512 Added a check when step is a parameter and flag it as error.
2513 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2514 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2517 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2519 * c-parser.c (c_parser_omp_parallel): Fix description.
2521 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2523 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2524 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2525 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2526 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2528 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2531 * c-parser.c (c_parser_alignas_specifier): Use
2532 c_sizeof_or_alignof_type instead of c_alignof.
2533 (c_parser_alignof_expression): Likewise, with min_alignof
2534 parameter depending on alignof spelling used.
2536 2013-12-04 Marek Polacek <polacek@redhat.com>
2539 * c-decl.c (start_function): Don't warn for missing prototype for
2542 2013-12-03 Marek Polacek <polacek@redhat.com>
2545 * c-decl.c (build_compound_literal): Allow compound literals with
2546 empty initial value.
2548 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2551 * c-typeck.c (build_modify_expr): Diagnose assignment to
2552 expression with array type.
2554 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2557 * c-typeck.c (process_init_element): Do not treat a string as
2558 initializing a whole array when used with a designator for an
2561 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2564 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2565 an inline function following a static declaration.
2567 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2570 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2571 to p_name before calling c_parser_omp_teams instead of after.
2572 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2573 argument. Remove unused p_name variable.
2575 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2576 Jakub Jelinek <jakub@redhat.com>
2578 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2579 external_scope is NULL.
2581 2013-11-27 Tom de Vries <tom@codesourcery.com>
2582 Marc Glisse <marc.glisse@inria.fr>
2585 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2587 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2589 * c-typeck.c: Add required include files from gimple.h.
2591 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2593 * c-decl.c (define_label, shadow_tag_warned)
2594 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2595 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2596 (declspecs_add_type): Remove use of in_system_header macro.
2597 * c-parser.c (c_parser_unary_expression): Likewise.
2598 * c-typeck.c (store_init_value, process_init_element)
2599 (c_start_case): Likewise.
2601 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2604 * c-parser.c (c_parser_set_source_position_from_token): Remove
2605 reference to in_system_header from comment.
2607 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2609 * c-decl.c (grokdeclarator): Update comment to refer to
2610 tree_to_[su]hwi rather than tree_low_cst.
2612 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2614 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2615 tree_to_uhwi throughout.
2617 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2619 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2622 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2624 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2627 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2629 * c-parser.c (c_parser_cilk_simd): New.
2630 (c_parser_cilk_verify_simd): New.
2631 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2632 (c_parser_omp_for_loop): Add case for NE_EXPR.
2633 Set c_break_label for CILK_SIMD.
2634 (c_parser_cilk_clause_vectorlength): New.
2635 (c_parser_cilk_clause_linear): New.
2636 (c_parser_cilk_clause_name): New.
2637 (c_parser_cilk_all_clauses): New.
2638 * c-typeck.c (build_unary_op): Pass location argument to
2640 (build_modify_expr): Same.
2641 (build_asm_expr): Same.
2642 (c_finish_bc_stmt): Error on break/continue in loops.
2644 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2646 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2648 2013-11-14 Diego Novillo <dnovillo@google.com>
2650 * c-decl.c: Include print-tree.h.
2651 Include stor-layout.h.
2654 Include stringpool.h.
2655 * c-lang.c: Include fold-const.h.
2656 * c-parser.c: Include stringpool.h.
2658 Include stor-layout.h.
2660 Include trans-mem.h.
2661 * c-typeck.c: Include stor-layout.h.
2662 Include trans-mem.h.
2666 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2668 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2669 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2671 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2672 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2674 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2675 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2676 (c_parser_declarator, c_parser_direct_declarator_inner)
2677 (c_parser_parameter_declaration, c_parser_type_name): All callers
2679 (c_parser_declaration_or_fndef): Handle declarations with type
2680 determined from the initializer.
2682 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2684 * c-typeck.c: Include gimplify.h.
2686 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2688 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2689 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2691 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2692 or _Thread_local as appropriate in diagnostics.
2693 (build_null_declspecs): Initialize ret->thread_gnu_p.
2694 (declspecs_add_scspec): Handle either __thread or _Thread_local
2695 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2696 pedantic. Do not disallow _Thread_local extern and _Thread_local
2699 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2700 Andrew MacLeod <amacleod@redhat.com>
2702 * c-aux-info.c (gen_type): Handle atomic qualifier.
2703 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2704 qualifiers when compating types.
2705 (shadow_tag_warned): Handle atomic_p in declspecs.
2706 (quals_from_declspecs): Likewise.
2707 (start_decl): Use c_type_promotes_to when promoting argument
2709 (grokdeclarator): Handle _Atomic.
2710 (get_parm_info): Diagnose any qualifier on "void" as only
2712 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2713 comparing types. Use c_type_promotes_to when promoting argument
2715 (finish_function): Use c_type_promotes_to when promoting argument
2717 (build_null_declspecs): Handle atomic_p in declspecs.
2718 (declspecs_add_qual): Handle RID_ATOMIC.
2719 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2720 (c_token_starts_declspecs): Handle RID_ATOMIC.
2721 (c_parser_declspecs): Handle atomic type specifiers and
2723 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2724 from types of expressions with atomic type.
2725 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2726 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2727 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2728 (c_parser_statement_after_labels, c_parser_switch_statement)
2729 (c_parser_for_statement, c_parser_expr_no_commas)
2730 (c_parser_conditional_expression, c_parser_binary_expression)
2731 (c_parser_cast_expression, c_parser_unary_expression)
2732 (c_parser_postfix_expression)
2733 (c_parser_postfix_expression_after_primary, c_parser_expression):
2734 Use convert_lvalue_to_rvalue.
2735 (c_parser_expression_conv, c_parser_expr_list): Document
2736 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2737 (c_parser_objc_synchronized_statement): Use
2738 convert_lvalue_to_rvalue.
2739 (c_parser_objc_selector): Handle RID_ATOMIC.
2740 (c_parser_objc_receiver, c_parser_array_notation): Use
2741 convert_lvalue_to_rvalue.
2742 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2743 _Atomic (type-name).
2744 (struct c_declspecs): Add atomic_p field.
2745 (convert_lvalue_to_rvalue): Declare.
2746 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2747 corresponding atomic types.
2748 (qualify_type): Don't add _Atomic qualifiers from second argument.
2749 (comp_target_types): Do not allow _Atomic mismatches.
2750 (type_lists_compatible_p): Do not remove atomic qualifiers when
2752 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2753 (build_atomic_assign): New functions.
2754 (build_unary_op): Use build_atomic_assign for atomic increment and
2756 (build_conditional_expr): Do not treat _Atomic void as a qualified
2758 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2759 (find_anonymous_field_with_type, convert_to_anonymous_field)
2760 (convert_for_assignment): Do not remove atomic qualifiers when
2762 (digest_init): Do not accept initialization of arrays of atomic
2763 elements by string constants.
2764 (build_asm_expr): Use convert_lvalue_to_rvalue.
2765 (build_binary_op): Do not treat _Atomic void as a qualified
2768 2013-11-06 DJ Delorie <dj@redhat.com>
2770 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2771 both explicit and builtin, print the location of the explicit one.
2773 2013-11-05 Tobias Burnus <burnus@net-b.de>
2775 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2776 c_parser_omp_distribute, c_parser_omp_teams,
2777 c_parser_omp_target, c_parser_omp_declare): Handle
2780 2013-11-03 Marek Polacek <polacek@redhat.com>
2782 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2784 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2786 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2787 check_dup_generic at the end, unless remove is true.
2788 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2790 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2792 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2794 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2795 with decl that is not pointer nor array.
2797 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2799 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2800 a spawning function is found.
2801 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2802 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2803 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2804 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2806 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2807 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2809 (c_finish_return): Added a check to reject _Cilk_spawn in return
2811 (build_cilk_spawn): New function.
2812 (build_cilk_sync): Likewise.
2813 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2815 2013-10-27 Tobias Burnus <burnus@net-b.de>
2818 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2819 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2820 (c_parser_statement_after_labels): Update calls.
2822 2013-10-24 Tobias Burnus <burnus@net-b.de>
2825 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2826 Handle PRAGMA_IVDEP.
2827 (c_parser_statement_after_labels): Update call.
2829 2013-10-24 Marek Polacek <polacek@redhat.com>
2831 * c-parser.c (c_parser_struct_declaration): Add a comment.
2832 (c_parser_declarator): Don't allow _Alignas here.
2834 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
2836 * c-parser.c: Include omp-low.h.
2837 * c-typeck.c: Likewise.
2839 2013-10-17 Marek Polacek <polacek@redhat.com>
2842 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2843 Document syntax of the array-declarator.
2844 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2846 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2847 (c_parser_struct_declaration): Likewise.
2848 (c_parser_declarator): Likewise.
2849 (c_parser_direct_declarator_inner): Likewise.
2850 (c_parser_parameter_declaration): Likewise.
2851 (c_parser_type_name): Likewise.
2853 2013-10-11 Jakub Jelinek <jakub@redhat.com>
2855 * c-lang.h (current_omp_declare_target_attribute): New extern
2857 * c-parser.c: Include c-lang.h.
2858 (struct c_parser): Change tokens to c_token *.
2859 Add tokens_buf field. Change tokens_avail type to unsigned int.
2860 (c_parser_consume_token): If parser->tokens isn't
2861 &parser->tokens_buf[0], increment parser->tokens.
2862 (c_parser_consume_pragma): Likewise.
2863 (enum pragma_context): Add pragma_struct and pragma_param.
2864 (c_parser_external_declaration): Adjust
2865 c_parser_declaration_or_fndef caller.
2866 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2867 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2868 Adjust recursive call.
2869 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2871 (c_parser_parameter_declaration): Use pragma_param instead of
2873 (c_parser_compound_statement_nostart, c_parser_label,
2874 c_parser_for_statement): Adjust
2875 c_parser_declaration_or_fndef callers.
2876 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2877 it through to c_parser_conditional_expression.
2878 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2879 pass it through to c_parser_binary_expression. Adjust recursive
2881 (c_parser_binary_expression): Remove prec argument, add
2882 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2883 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2884 binop matches it, use build2 instead of parser_build_binary_op.
2885 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2886 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2887 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2888 Handle pragma_struct and pragma_param the same as pragma_external.
2889 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2890 (c_parser_omp_variable_list): Parse array sections for
2891 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2892 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2893 (c_parser_omp_clause_reduction): Handle user defined reductions.
2894 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2895 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2896 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2897 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2898 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2899 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2900 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2901 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2902 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2903 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2904 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2905 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2906 (c_parser_omp_for_loop): Add CODE argument, pass it through
2907 to c_finish_omp_for. Change last argument to cclauses,
2908 and adjust uses to grab parallel clauses from the array of all
2909 the split clauses. Adjust c_parser_binary_expression,
2910 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2911 (omp_split_clauses): New function.
2912 (c_parser_omp_simd): New function.
2913 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2914 Allow the function to be called also when parsing combined constructs,
2915 and call c_parser_omp_simd when parsing for simd.
2916 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2917 #pragma omp section, require exactly one structured-block instead of
2918 sequence of statements.
2919 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2920 Allow the function to be called also when parsing combined constructs.
2921 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2922 Allow the function to be called also when parsing combined
2924 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2925 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2926 c_parser_omp_teams, c_parser_omp_target_data,
2927 c_parser_omp_target_update, c_parser_omp_target,
2928 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2929 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2930 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2931 (c_parser_omp_construct): Add p_name and mask vars. Handle
2932 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2933 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2934 and c_parser_omp_sections callers.
2935 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2936 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2937 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2938 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2939 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2941 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2942 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2943 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2944 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2945 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2946 * c-typeck.c: Include tree-inline.h.
2947 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2948 handle_omp_array_sections_1, handle_omp_array_sections,
2949 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2950 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2951 user defined reductions.
2952 (c_tree_equal): New function.
2953 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2954 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2955 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2956 c_check_omp_declare_reduction_r): New prototypes.
2957 * c-decl.c (current_omp_declare_target_attribute): New variable.
2958 (c_decl_attributes): New function.
2959 (start_decl, start_function): Use it instead of decl_attributes.
2960 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2961 c_omp_reduction_decl, c_omp_reduction_lookup,
2962 c_check_omp_declare_reduction_r): New functions.
2964 2013-09-25 Tom Tromey <tromey@redhat.com>
2966 * Make-lang.in (c/gccspec.o): Remove.
2967 (CFLAGS-c/gccspec.o): New variable.
2968 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2969 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2970 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2972 2013-09-25 Tom Tromey <tromey@redhat.com>
2974 * Make-lang.in (c/gccspec.o): Don't use subshell.
2976 2013-09-18 Marek Polacek <polacek@redhat.com>
2979 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2980 Remove unnecessary check.
2982 2013-09-18 Marek Polacek <polacek@redhat.com>
2985 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2986 no_sanitize_undefined attribute.
2988 2013-09-13 Kai Tietz <ktietz@redhat.com>
2991 * c-decl.c (c_builtin_function_ext_scope): Remove
2992 wrong assumption that it is never called on prexisting
2995 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2997 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2999 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3001 * c-objc-common.c (c_tree_printer): Tidy.
3003 2013-08-30 Marek Polacek <polacek@redhat.com>
3005 * c-typeck.c (build_binary_op): Add division by zero and shift
3008 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3009 Joseph Myers <joseph@codesourcery.com>
3012 * c-typeck.c (c_common_type): Prefer double_type_node over
3013 other REAL_TYPE types with the same precision.
3014 (convert_arguments): Likewise.
3016 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3018 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3019 (c_initialize_diagnostics): Call a destructor for the early printer.
3021 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3023 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3024 printer initialization.
3026 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3029 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3030 check for truth values.
3031 (expand_array_notation_exprs): Added truth values case. Removed an
3032 unwanted else. Added for-loop to walk through subtrees in default
3035 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3037 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3039 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3041 * c-parser.c (struct c_generic_association): Fix typo.
3043 2013-07-23 Tom Tromey <tromey@redhat.com>
3044 Joseph Myers <joseph@codesourcery.com>
3046 * c-parser.c (struct c_generic_association): New.
3047 (c_generic_association_d): New typedef.
3048 (c_parser_generic_selection): New function.
3049 (c_parser_postfix_expression): Handle RID_GENERIC.
3051 2013-07-13 Jason Merrill <jason@redhat.com>
3054 * c-decl.c (finish_struct): Check for too-large class.
3056 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3059 * c-typeck.c (set_init_index): When folding, check for index overflow.
3061 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3063 * c-parser.c (c_parser_array_notation): Removed rejection of array
3064 notations in an array of function pointers.
3066 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3068 * c-array-notation.c (make_triplet_val_inv): New function.
3069 (create_cmp_incr): Likewise.
3070 (create_array_refs): Likewise.
3071 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3072 Also modularized common parts between functions and called the function.
3073 (build_array_notation_expr): Likewise.
3074 (fix_conditional_array_notations_1): Likewise.
3075 (fix_array_notation_expr): Likewise.
3076 (fix_array_notation_call_expr): Likewise.
3078 2013-06-18 Marek Polacek <polacek@redhat.com>
3081 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3083 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3085 * c-array-notation.c (build_array_notation_expr): Reject array notation
3086 mismatch between LHS and RHS even inside a call_expr. Also, removed
3087 a couple while statements that were dead code.
3089 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3091 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3092 excessive precision expressions in function parameters. Also removed
3093 couple unwanted while statements.
3095 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3097 * c-array-notation.c (expand_array_notation_exprs): Added
3098 ARRAY_NOTATION_REF case.
3100 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3102 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3103 function to c-family/array-notation-common.c.
3104 (is_cilkplus_reduce_builtin): Likewise.
3105 (find_rank): Likewise.
3106 (extract_array_notation_exprs): Likewise.
3107 (replace_array_notations): Likewise.
3108 (find_inv_trees): Likewise.
3109 (replace_inv_trees): Likewise.
3110 (contains_array_notation_expr): Likewise.
3111 (find_correct_array_notation_type): Likewise.
3112 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3113 (struct inv_list): Moved this to c-family/array-notation-common.c.
3114 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3116 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3118 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3119 reduction functions outside the for-loop. Added a check if the fundecl
3120 is non-NULL. Finally, removed an unwanted if-statement, and made the
3123 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3125 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3126 condition of the if-statement matches the rank of else-block and then-
3127 block when array notations are used.
3128 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3129 expression after the entire function body is parsed.
3130 (c_parser_expr_no_commas): Delayed creating array notation expressions
3131 to the end of function parsing.
3132 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3133 whole if-statement instead of just the condition.
3134 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3136 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3139 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3140 array to NULL_TREE if they are unused. Also added a check for the
3141 field to be NULL before its fields are used in future.
3143 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3146 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3147 (build_array_notation_expr): Likewise.
3149 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3151 * c-typeck.c (build_array_ref): Added a check to see if array's
3152 index is greater than one. If true, then emit an error.
3153 (build_function_call_vec): Exclude error reporting and checking
3154 for builtin array-notation functions.
3155 (convert_arguments): Likewise.
3156 (c_finish_return): Added a check for array notations as a return
3157 expression. If true, then emit an error.
3158 (c_finish_loop): Added a check for array notations in a loop
3159 condition. If true then emit an error.
3160 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3161 (build_binary_op): Added a check for array notation expr inside
3162 op1 and op0. If present, we call another function to find correct
3164 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3165 * c-parser.c (c_parser_compound_statement): Check if array
3166 notation code is used in tree, if so, then transform them into
3168 (c_parser_expr_no_commas): Check if array notation is used in LHS
3169 or RHS, if so, then build array notation expression instead of
3171 (c_parser_postfix_expression_after_primary): Added a check for
3172 colon(s) after square braces, if so then handle it like an array
3173 notation. Also, break up array notations in unary op if found.
3174 (c_parser_direct_declarator_inner): Added a check for array
3176 (c_parser_compound_statement): Added a check for array notation in
3177 a stmt. If one is present, then expand array notation expr.
3178 (c_parser_if_statement): Likewise.
3179 (c_parser_switch_statement): Added a check for array notations in
3180 a switch statement's condition. If true, then output an error.
3181 (c_parser_while_statement): Similarly, but for a while.
3182 (c_parser_do_statement): Similarly, but for a do-while.
3183 (c_parser_for_statement): Similarly, but for a for-loop.
3184 (c_parser_unary_expression): Check if array notation is used in a
3185 pre-increment or pre-decrement expression. If true, then expand
3187 (c_parser_array_notation): New function.
3188 * c-array-notation.c: New file.
3189 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3191 2013-05-23 Mike Stump <mikestump@comcast.net>
3193 * c-typeck.c (convert_for_assignment): Handle references to memory
3196 2013-05-16 Jason Merrill <jason@redhat.com>
3198 * Make-lang.in (cc1$(exeext)): Use link mutex.
3200 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3202 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3203 to simply use OPT_Wpointer_arith.
3204 (build_unary_op): Likewise.
3206 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3209 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3210 argument. If set, or it temporarily for parsing of the first
3211 argument into force_folding_builtin_constant_p.
3212 (c_parser_postfix_expression): Adjust callers.
3214 2013-03-21 Richard Biener <rguenther@suse.de>
3216 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3217 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3219 2013-02-12 Marek Polacek <polacek@redhat.com>
3222 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3225 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3228 * c-typeck.c (set_nonincremental_init_from_string): If
3229 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3231 (process_init_element): Likewise.
3233 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3236 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3237 argument, don't call default_function_array_conversion
3238 nor c_fully_fold here.
3239 (c_parser_asm_statement): Adjust callers.
3240 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3241 and outputs here, and call default_function_array_conversion
3242 on inputs that don't need to be addressable.
3244 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3247 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3248 warning require that both c_common_unsigned_type as well as
3249 c_common_signed_type is the same for both mvl and mvr types.
3251 2012-11-16 Diego Novillo <dnovillo@google.com>
3253 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3255 * c-common.c: Use new vec API in vec.h.
3256 * c-common.h: Likewise.
3257 * c-gimplify.c: Likewise.
3258 * c-pragma.c: Likewise.
3259 * c-pretty-print.c: Likewise.
3260 * c-pretty-print.h: Likewise.
3261 * c-semantics.c: Likewise.
3262 * c-decl.c: Likewise.
3263 * c-parser.c: Likewise.
3264 * c-tree.h: Likewise.
3265 * c-typeck.c: Likewise.
3267 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3270 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3272 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3275 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3276 shadows a function, unless the variable is a function or a
3277 pointer-to-function.
3279 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3282 * c-parser.c (struct c_tree_loc_pair): Removed.
3283 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3284 add location_t * and tree * arguments, fill in array of 3
3285 sizeof_arg trees and corresponding locs.
3286 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3287 c_parser_expr_list callers.
3288 (c_parser_postfix_expression_after_primary): Likewise. Pass
3289 array of 3 sizeof_arg trees and locs (corresponding to first
3290 3 arguments) to sizeof_pointer_memaccess_warning.
3292 2012-10-09 Lawrence Crowl <crowl@google.com>
3294 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3295 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3298 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3301 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3304 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3307 * c-typeck.c: Include c-common.h.
3308 (enum stv_conv): Moved to c-common.h.
3309 (scalar_to_vector): Moved to c-common.c.
3310 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3311 * Make-lang.in: c-typeck.c depends on c-common.h.
3313 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3315 * c-decl.c (c_write_global_declarations): Fix handling of
3318 2012-09-30 Sharad Singhai <singhai@google.com>
3320 * c-decl.c (c_write_global_declarations): Use a different method
3321 to determine if the dump has ben initialized.
3323 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3326 * c-typeck.c (c_cast_expr): When casting to a type requiring
3327 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3330 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3333 * c-typeck.c (build_unary_op): Pass original argument of
3334 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3335 any C_MAYBE_CONST_EXPR, if it has integer operands.
3336 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3337 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3338 to c_objc_common_truthvalue_conversion, then remove any
3339 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3340 c_objc_common_truthvalue_conversion not
3341 c_common_truthvalue_conversion.
3342 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3343 call note_integer_operands for arguments with integer operands
3344 that are not integer constants.
3346 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3349 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3350 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3352 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3355 * c-convert.c (convert): Don't call fold_convert_loc if
3356 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3357 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3358 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3360 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3363 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3364 for nested and empty_ok arguments in the call to
3365 c_parser_declaration_or_fndef.
3367 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3369 * c-tree.h (c_last_sizeof_arg): Declare.
3370 * c-parser.c (struct c_tree_loc_pair): New type.
3371 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3373 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3374 (c_parser_postfix_expression_after_primary): Likewise. Call
3375 sizeof_pointer_memaccess_warning if needed.
3376 (sizeof_ptr_memacc_comptypes): New function.
3377 * c-typeck.c (c_last_sizeof_arg): New global variable.
3378 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3380 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3382 * c-lang.h (lang_decl): Add variable_size GTY option.
3384 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3386 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3387 * Make-lang.in: Fix dependencies.
3389 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3391 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3392 and add language Makefile hooks.
3393 * config-lang.in: New file.
3394 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3395 add the required "normal" config-lang.in rules.
3396 * c-lang.h: Moved from gcc/ to here.
3397 * c-tree.h: Likewise.
3398 * c-objc-common.c: Likewise.
3399 * c-objc-common.h: Likewise.
3400 * c-typeck.c: Likewise.
3401 * c-convert.c: Likewise.
3402 * c-lang.c: Likewise.
3403 * c-aux-info.c: Likewise.
3404 * c-errors.c: Likewise.
3405 * gccspec.c: Likewise.
3406 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3407 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3409 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3411 Copying and distribution of this file, with or without modification,
3412 are permitted in any medium without royalty provided the copyright
3413 notice and this notice are preserved.