[gcc r12-7490] Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler.
Iain D Sandoe
iains@gcc.gnu.org
Fri Mar 4 16:48:30 GMT 2022
https://gcc.gnu.org/g:25587472ccd223c861fe77cfeca4ba33c3f6cd99
commit r12-7490-g25587472ccd223c861fe77cfeca4ba33c3f6cd99
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.cc (darwin_fold_builtin): Make fcode an int to
avoid a mismatch with DECL_MD_FUNCTION_CODE().
Diff:
---
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)
{
More information about the Gcc-cvs
mailing list