diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 16:16:33 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 16:16:33 +0000 |
commit | 89ab38872b6855cc949da8c98193475846373bf3 (patch) | |
tree | a4e7871be466032d2019d3dd74d2f1702b848756 /gcc/real.h | |
parent | 1f8ad3f723ae0ef51930007ebc47611111a41f35 (diff) | |
download | gcc-89ab38872b6855cc949da8c98193475846373bf3.tar.gz |
* real.c (real_floor, real_ceil): Tweak to allow input and output
arguments to overlap.
(real_round): New function to implement round(3m) semantics.
* real.h (real_round): Prototype here.
* builtins.c (fold_builtin_round): New function to constant fold
round, roundf and roundl.
(fold_builtin): Call fold_builtin_round for BUILT_IN_ROUND{,F,L}.
* gcc.dg/builtins-29.c: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76428 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.h')
-rw-r--r-- | gcc/real.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/real.h b/gcc/real.h index 3620d50580a..3ff0356bd65 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -1,6 +1,6 @@ /* Definitions of floating-point access for GNU compiler. Copyright (C) 1989, 1991, 1994, 1996, 1997, 1998, 1999, - 2000, 2002, 2003 Free Software Foundation, Inc. + 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -372,5 +372,7 @@ extern void real_floor (REAL_VALUE_TYPE *, enum machine_mode, const REAL_VALUE_TYPE *); extern void real_ceil (REAL_VALUE_TYPE *, enum machine_mode, const REAL_VALUE_TYPE *); +extern void real_round (REAL_VALUE_TYPE *, enum machine_mode, + const REAL_VALUE_TYPE *); #endif /* ! GCC_REAL_H */ |