From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id B3B503829BD4; Sun, 29 May 2022 19:02:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3B503829BD4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-10775] Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: e612fc356db36a15fa8224ed88e7bef3276c24c5 X-Git-Newrev: 50f5c5284f4e047e085516c506cf15f695c13f82 Message-Id: <20220529190227.B3B503829BD4@sourceware.org> Date: Sun, 29 May 2022 19:02:27 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2022 19:02:27 -0000 https://gcc.gnu.org/g:50f5c5284f4e047e085516c506cf15f695c13f82 commit r10-10775-g50f5c5284f4e047e085516c506cf15f695c13f82 Author: Iain Sandoe Date: Fri Mar 4 12:39:03 2022 +0000 Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler. DECL_MD_FUNCTION_CODE() returns an int, on one particular compiler the code in darwin_fold_builtin() triggers a warning. Fixed thus. Signed-off-by: Iain Sandoe gcc/ChangeLog: * config/darwin.c (darwin_fold_builtin): Make fcode an int to avoid a mismatch with DECL_MD_FUNCTION_CODE(). (cherry picked from commit 25587472ccd223c861fe77cfeca4ba33c3f6cd99) Diff: --- gcc/config/darwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 89513c0d145..5d66709a3dd 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3569,7 +3569,7 @@ tree darwin_fold_builtin (tree fndecl, int n_args, tree *argp, bool ARG_UNUSED (ignore)) { - unsigned int fcode = DECL_MD_FUNCTION_CODE (fndecl); + int fcode = DECL_MD_FUNCTION_CODE (fndecl); if (fcode == darwin_builtin_cfstring) {