From owner-svn-src-head@FreeBSD.ORG Fri Dec 6 02:20:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5B14E7C; Fri, 6 Dec 2013 02:20:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 866F71FEF; Fri, 6 Dec 2013 02:20:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB62K0X4033153; Fri, 6 Dec 2013 02:20:00 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB62JxrU033055; Fri, 6 Dec 2013 02:19:59 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312060219.rB62JxrU033055@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 6 Dec 2013 02:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259022 - in head/contrib/gcc: . cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 02:20:00 -0000 Author: pfg Date: Fri Dec 6 02:19:58 2013 New Revision: 259022 URL: http://svnweb.freebsd.org/changeset/base/259022 Log: gcc: Include types in error message for build_binary_op. Mostly cosmetic change, again to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 125239; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/c-common.c head/contrib/gcc/c-common.h head/contrib/gcc/c-typeck.c head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/typeck.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/ChangeLog.gcc43 Fri Dec 6 02:19:58 2013 (r259022) @@ -57,6 +57,14 @@ operand. (store_expr): Handle BLKmode moves by calling emit_block_move. +2007-05-31 Daniel Berlin (r125239) + + * c-typeck.c (build_indirect_ref): Include type in error message. + (build_binary_op): Pass types to binary_op_error. + * c-common.c (binary_op_error): Take two type arguments, print out + types with error. + * c-common.h (binary_op_error): Update prototype. + 2007-05-27 Eric Christopher (r125116) * config/rs6000/rs6000.c (rs6000_emit_prologue): Update Modified: head/contrib/gcc/c-common.c ============================================================================== --- head/contrib/gcc/c-common.c Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/c-common.c Fri Dec 6 02:19:58 2013 (r259022) @@ -2019,10 +2019,10 @@ min_precision (tree value, int unsignedp } /* Print an error message for invalid operands to arith operation - CODE. */ + CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */ void -binary_op_error (enum tree_code code) +binary_op_error (enum tree_code code, tree type0, tree type1) { const char *opname; @@ -2073,7 +2073,8 @@ binary_op_error (enum tree_code code) default: gcc_unreachable (); } - error ("invalid operands to binary %s", opname); + error ("invalid operands to binary %s (have %qT and %qT)", opname, + type0, type1); } /* Subroutine of build_binary_op, used for comparison operations. Modified: head/contrib/gcc/c-common.h ============================================================================== --- head/contrib/gcc/c-common.h Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/c-common.h Fri Dec 6 02:19:58 2013 (r259022) @@ -654,7 +654,7 @@ extern tree c_sizeof_or_alignof_type (tr extern tree c_alignof_expr (tree); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ -extern void binary_op_error (enum tree_code); +extern void binary_op_error (enum tree_code, tree, tree); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); Modified: head/contrib/gcc/c-typeck.c ============================================================================== --- head/contrib/gcc/c-typeck.c Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/c-typeck.c Fri Dec 6 02:19:58 2013 (r259022) @@ -1923,7 +1923,7 @@ build_indirect_ref (tree ptr, const char } } else if (TREE_CODE (pointer) != ERROR_MARK) - error ("invalid type argument of %qs", errorstring); + error ("invalid type argument of %qs (have %qT)", errorstring, type); return error_mark_node; } @@ -8135,7 +8135,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1)))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } @@ -8431,7 +8431,7 @@ build_binary_op (enum tree_code code, tr if (!result_type) { - binary_op_error (code); + binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1)); return error_mark_node; } Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 6 02:19:58 2013 (r259022) @@ -18,6 +18,10 @@ * decl2.c (determine_visibility): Remove duplicate code for handling type info. +2007-05-31 Daniel Berlin (r125239) + + * typeck.c (build_binary_op): Include types in error. + 2007-05-05 Geoffrey Keating (r124467) PR 31775 Modified: head/contrib/gcc/cp/typeck.c ============================================================================== --- head/contrib/gcc/cp/typeck.c Fri Dec 6 01:16:26 2013 (r259021) +++ head/contrib/gcc/cp/typeck.c Fri Dec 6 02:19:58 2013 (r259022) @@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } arithmetic_types_p = 1;