summaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 08:08:45 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 08:08:45 +0000
commit2def4626263b89400488ee0b0c80aa37ccb11da1 (patch)
treefcfb8ad6695559d7afcf07bbdca29d1831713173 /gcc/convert.c
parent87c764583df24a4b36bd98e50ab4fc68a51794e6 (diff)
downloadgcc-2def4626263b89400488ee0b0c80aa37ccb11da1.tar.gz
PR middle-end/21282
* convert.c (convert_to_integer): Convert ceil and floor in c99 mode only. testsuite: PR middle-end/21282 * gcc.dg/pr21282.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index c6c2620ab11..97705a2926a 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -349,26 +349,20 @@ convert_to_integer (tree type, tree expr)
switch (fcode)
{
- case BUILT_IN_CEILF:
- case BUILT_IN_CEILL:
+ case BUILT_IN_CEIL: case BUILT_IN_CEILF: case BUILT_IN_CEILL:
/* Only convert in ISO C99 mode. */
if (!TARGET_C99_FUNCTIONS)
break;
- /* ... Fall through ... */
- case BUILT_IN_CEIL:
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (long_long_integer_type_node))
fn = mathfn_built_in (s_intype, BUILT_IN_LLCEIL);
else
fn = mathfn_built_in (s_intype, BUILT_IN_LCEIL);
break;
- case BUILT_IN_FLOORF:
- case BUILT_IN_FLOORL:
+ case BUILT_IN_FLOOR: case BUILT_IN_FLOORF: case BUILT_IN_FLOORL:
/* Only convert in ISO C99 mode. */
if (!TARGET_C99_FUNCTIONS)
break;
- /* ... Fall through ... */
- case BUILT_IN_FLOOR:
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (long_long_integer_type_node))
fn = mathfn_built_in (s_intype, BUILT_IN_LLFLOOR);
else