public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler.
@ 2022-03-04 16:49 Iain Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain Sandoe @ 2022-03-04 16:49 UTC (permalink / raw)
  To: gcc-patches

DECL_MD_FUNCTION_CODE() returns an int, on one particular compiler the
code in darwin_fold_builtin() triggers a warning.

Fixed thus.

tested on x86_64-darwin18, powerpc-darwin9, cross to powerpc-darwin8.
pushed to master, thanks
Iain

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/ChangeLog:

	* config/darwin.cc (darwin_fold_builtin): Make fcode an int to
	avoid a mismatch with DECL_MD_FUNCTION_CODE().
---
 gcc/config/darwin.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc
index 783fe3cb443..f065a13d73d 100644
--- a/gcc/config/darwin.cc
+++ b/gcc/config/darwin.cc
@@ -3621,7 +3621,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)
     {
-- 
2.24.3 (Apple Git-128)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-04 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 16:49 [pushed] Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler Iain Sandoe

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).