Commit 157b3890 by Roger Sayle Committed by Roger Sayle

builtins.c (fold_builtin_fabs): Convert argument to the appropriate type as args…

builtins.c (fold_builtin_fabs): Convert argument to the appropriate type as args of unprototyped builtins...


	* builtins.c (fold_builtin_fabs): Convert argument to the appropriate
	type as args of unprototyped builtins aren't automatically promoted.
	(fold_builtin_abs): Likewise.

From-SVN: r93220
parent 9a43b902
2005-01-11 Roger Sayle <roger@eyesopen.com>
* builtins.c (fold_builtin_fabs): Convert argument to the appropriate
type as args of unprototyped builtins aren't automatically promoted.
(fold_builtin_abs): Likewise.
2005-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in: Set a `build-warn' variable.
......
......@@ -7461,6 +7461,7 @@ fold_builtin_fabs (tree arglist, tree type)
return 0;
arg = TREE_VALUE (arglist);
arg = fold_convert (type, arg);
if (TREE_CODE (arg) == REAL_CST)
return fold_abs_const (arg, type);
return fold (build1 (ABS_EXPR, type, arg));
......@@ -7477,6 +7478,7 @@ fold_builtin_abs (tree arglist, tree type)
return 0;
arg = TREE_VALUE (arglist);
arg = fold_convert (type, arg);
if (TREE_CODE (arg) == INTEGER_CST)
return fold_abs_const (arg, type);
return fold (build1 (ABS_EXPR, type, arg));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment