1. 18 Mar, 2016 1 commit
  2. 17 Mar, 2016 2 commits
  3. 16 Mar, 2016 1 commit
    • re PR c/70093 (Instancing function with VM return type cases internal compiler… · ab4c578f
      re PR c/70093 (Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.)
      
      	PR c/70093
      	* c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
      	nested functions returning VM types.
      
      	* cgraphunit.c (cgraph_node::expand_thunk): Also build call to the
      	function being thunked if the result type doesn't have fixed size.
      	* gimplify.c (gimplify_modify_expr): Also set LHS if the result type
      	doesn't have fixed size.
      
      	* gcc.dg/nested-func-10.c: New test.
      	* gcc.dg/nested-func-9.c: New test.
      
      From-SVN: r234259
      Marek Polacek committed
  4. 09 Mar, 2016 1 commit
  5. 05 Mar, 2016 1 commit
  6. 04 Mar, 2016 1 commit
  7. 01 Mar, 2016 1 commit
  8. 24 Feb, 2016 1 commit
  9. 23 Feb, 2016 1 commit
  10. 16 Feb, 2016 2 commits
    • re PR c/69835 (-Wnonnull diagnoses parameter comparisons with NULL even when… · bf14eba2
      re PR c/69835 (-Wnonnull diagnoses parameter comparisons with NULL even when those could have changed)
      
      	PR c/69835
      	* common.opt (Wnonnull-compare): New warning.
      	* doc/invoke.texi (-Wnonnull): Remove text about comparison
      	of arguments against NULL.
      	(-Wnonnull-compare): Document.
      	* Makefile.in (OBJS): Add gimple-ssa-nonnull-compare.o.
      	* tree-pass.h (make_pass_warn_nonnull_compare): Declare.
      	* passes.def (pass_warn_nonnull_compare): Add.
      	* gimple-ssa-nonnull-compare.c: New file.
      c-family/
      	* c.opt (Wnonnull-compare): Enable for -Wall.
      c/
      	* c-typeck.c (build_binary_op): Revert 2015-09-09 change.
      cp/
      	* typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
      testsuite/
      	* c-c++-common/nonnull-1.c: Use -Wnonnull-compare instead of
      	-Wnonnull in dg-options.
      	* c-c++-common/nonnull-2.c: New test.
      
      From-SVN: r233472
      Jakub Jelinek committed
    • re PR c/64748 (OpenACC: "is not a variable" error with deviceptr()) · ba539195
      	PR c/64748
      
      	gcc/c/
      	* c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
      
      	gcc/cp/
      	* parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
      	* semantics.c (finish_omp_clauses): Add deviceptr checking.
      
      	gcc/testsuite/
      	* c-c++-common/goacc/deviceptr-1.c: Add tests.
      	* g++.dg/goacc/deviceptr-1.c: New file.
      
      From-SVN: r233458
      James Norris committed
  11. 12 Feb, 2016 2 commits
  12. 11 Feb, 2016 1 commit
    • re PR c/69768 (Bogus -Waddress warning) · 66756373
      	PR c/69768
      	* c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
      	arguments for -Waddress warning.
      
      	* typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
      	arguments for -Waddress warning.  Fix up formatting.
      
      	* c-c++-common/Waddress-1.c: New test.
      
      From-SVN: r233357
      Jakub Jelinek committed
  13. 04 Feb, 2016 1 commit
  14. 29 Jan, 2016 1 commit
  15. 27 Jan, 2016 2 commits
  16. 26 Jan, 2016 1 commit
  17. 20 Jan, 2016 2 commits
  18. 14 Jan, 2016 2 commits
  19. 13 Jan, 2016 1 commit
    • Improve warning locations (PR66208) · 3342fd71
      	PR c/66208
      	* c-common.c (check_function_nonnull): Remove unnecessary declaration.
      	Add new arg loc and pass it down as context.
      	(check_nonnull_arg): Don't mark ctx arg as unused. Use it as a pointer
      	to the location to use for the warning.
      	(check_function_arguments): New arg loc.  All callers changed.  Pass
      	it to check_function_nonnull.
      	* c-common.h (check_function_arguments): Adjust declaration.
      
      testsuite/
      	PR c/66208
      	* c-c++-common/pr66208.c: New file.
      
      From-SVN: r232345
      Bernd Schmidt committed
  20. 06 Jan, 2016 2 commits
    • C: fix reported range of invalid unary dereference. · 7443cf13
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_unary_expression): For dereferences, build
      	a combined location before calling build_indirect_ref, so that
      	error reports cover the full range, manually updating the c_expr
      	src_range.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/bad-dereference.c: New test case.
      
      From-SVN: r232110
      David Malcolm committed
    • re PR sanitizer/69099 (ICE when compiling gcc.dg/atomic/c11-atomic-exec-2.c with… · 6b131d5b
      re PR sanitizer/69099 (ICE when compiling gcc.dg/atomic/c11-atomic-exec-2.c with -fsanitize=float-cast-overflow)
      
      	PR sanitizer/69099
      	* c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
      	ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
      	NULL.
      
      	* convert.c (convert_to_integer_1): Adjust call to
      	ubsan_instrument_float_cast.  Use NULL_TREE instead of NULL.
      	* ubsan.c (ubsan_instrument_float_cast): Drop the ARG parameter.  Use
      	EXPR instead of ARG.
      	* ubsan.h (ubsan_instrument_float_cast): Adjust declaration.
      
      	* gcc.dg/ubsan/float-cast-overflow-atomic.c: New test.
      
      From-SVN: r232099
      Marek Polacek committed
  21. 04 Jan, 2016 2 commits
  22. 23 Dec, 2015 1 commit
  23. 22 Dec, 2015 1 commit
  24. 21 Dec, 2015 1 commit
    • C and C++ FE: fix source ranges for binary ops · 745e411d
      gcc/c-family/ChangeLog:
      	* c-common.c (binary_op_error): Convert first param from
      	location_t to rich_location * and use it when emitting an error.
      	* c-common.h (binary_op_error): Convert first param from
      	location_t to rich_location *.
      
      gcc/c/ChangeLog:
      	* c-typeck.c: Include "gcc-rich-location.h".
      	(build_binary_op): In the two places that call binary_op_error,
      	create a gcc_rich_location and populate it with the location of
      	the binary op and its two operands.
      
      gcc/cp/ChangeLog:
      	* typeck.c (cp_build_binary_op): Update for change in signature
      	of build_binary_op.  Use error_at to replace an implicit use
      	of input_location with param "location" in "invalid operands"
      	error.
      	(cp_build_binary_op): Replace an error with an error_at, using
      	"location", rather than implicitly using input_location.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/diagnostic/bad-binary-ops.C: New test case.
      	* gcc.dg/bad-binary-ops.c: New test case.
      	gcc.dg/plugin/diagnostic_plugin_show_trees.c (get_range_for_expr):
      	Remove material copied from gcc-rich-location.c
      	(gcc_rich_location::add_expr): Likewise.
      
      From-SVN: r231884
      David Malcolm committed
  25. 17 Dec, 2015 1 commit
    • C FE: improvements to ranges of bad return values · 94c40e19
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_statement_after_labels): When calling
      	c_finish_return, Use the return expression's location if it has
      	one, falling back to the location of the first token within it.
      	* c-typeck.c (c_finish_return): When issuing warnings about
      	the incorrect presence/absence of a return value, issue a note
      	showing the declaration of the function.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/diagnostic-range-bad-return.c: New test case.
      
      From-SVN: r231786
      David Malcolm committed
  26. 16 Dec, 2015 4 commits
    • Better error recovery for merge-conflict markers · de67c4c3
      gcc/c-family/ChangeLog:
      	* c-common.h (conflict_marker_get_final_tok_kind): New prototype.
      	* c-lex.c (conflict_marker_get_final_tok_kind): New function.
      
      gcc/c/ChangeLog:
      	* c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
      	to 4.
      	(c_parser_peek_nth_token): New function.
      	(c_parser_peek_conflict_marker): New function.
      	(c_parser_error): Detect conflict markers and report them as such.
      
      gcc/cp/ChangeLog:
      	* parser.c (cp_lexer_peek_conflict_marker): New function.
      	(cp_parser_error): Detect conflict markers and report them as
      	such.
      
      gcc/testsuite/ChangeLog:
      	* c-c++-common/conflict-markers-1.c: New testcase.
      	* c-c++-common/conflict-markers-2.c: Likewise.
      	* c-c++-common/conflict-markers-3.c: Likewise.
      	* c-c++-common/conflict-markers-4.c: Likewise.
      	* c-c++-common/conflict-markers-5.c: Likewise.
      	* c-c++-common/conflict-markers-6.c: Likewise.
      	* c-c++-common/conflict-markers-7.c: Likewise.
      	* c-c++-common/conflict-markers-8.c: Likewise.
      	* c-c++-common/conflict-markers-9.c: Likewise.
      	* c-c++-common/conflict-markers-10.c: Likewise.
      	* c-c++-common/conflict-markers-11.c: Likewise.
      	* g++.dg/conflict-markers-1.C: Likewise.
      
      From-SVN: r231712
      David Malcolm committed
    • C FE: fix range of primary-expression in c_parser_postfix_expression · a10704e1
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
      	to preserve range information for the primary expression
      	in the call to c_parser_postfix_expression_after_primary.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/cast-function-1.c (bar): Update column numbers.
      	* gcc.dg/diagnostic-range-bad-called-object.c: New test case.
      
      From-SVN: r231709
      David Malcolm committed
    • C FE: use correct location range for static assertions · 8062bca6
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
      	expression location, falling back on the first token location,
      	rather than always using the latter.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/diagnostic-range-static-assert.c: New test case.
      
      From-SVN: r231704
      David Malcolm committed
    • re PR c/64637 (Incorrect location for -Wunused-value warnings in for-loop) · d06f8b75
      	PR c/64637
      	* c-typeck.c (c_process_expr_stmt): Use location of the expression if
      	available.
      
      	* gcc.dg/pr64637.c: New test.
      
      From-SVN: r231700
      Marek Polacek committed
  27. 15 Dec, 2015 1 commit
  28. 09 Dec, 2015 1 commit
  29. 08 Dec, 2015 1 commit
    • C: fix uninitialized ranges for __alignof__ · a1b93f8d
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_alignof_expression): Capture location of
      	closing parenthesis (if any), or of end of unary expression, and
      	use it to build a src_range for the expression.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/plugin/diagnostic-test-expressions-1.c (test_alignof):
      	New test function.
      
      From-SVN: r231415
      David Malcolm committed