]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 4 Mar 2022 12:39:03 +0000 (12:39 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 29 May 2022 19:01:45 +0000 (20:01 +0100)
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)

gcc/config/darwin.c

index 89513c0d14584c2feae605e9a6bd0ff0e4cc394e..5d66709a3ddd4ca949691902bf4d5cf9547e6b4a 100644 (file)
@@ -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)
     {