public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-11345] Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler.
Date: Tue, 23 Apr 2024 14:15:02 +0000 (GMT)	[thread overview]
Message-ID: <20240423141502.3DAA43858C42@sourceware.org> (raw)

https://gcc.gnu.org/g:a73f2d80e909b67bbe3dc0abb48cf422810e1564

commit r11-11345-ga73f2d80e909b67bbe3dc0abb48cf422810e1564
Author: Iain Sandoe <iain@sandoe.co.uk>
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 <iain@sandoe.co.uk>
    
    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 dedf84d6247..2371816e251 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3620,7 +3620,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)
     {

                 reply	other threads:[~2024-04-23 14:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240423141502.3DAA43858C42@sourceware.org \
    --to=iains@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).