[cfe-dev] interesting clang issue with "floor"

Richard Smith richard at metafoo.co.uk
Fri Jul 26 18:14:03 PDT 2013


On Fri, Jul 26, 2013 at 6:05 PM, reed kotler <rkotler at mips.com> wrote:

> I'm chasing down another issue with floor in llvm but noticed this strange
> behavior:
>
> Consider the following code:
>
> extern double floor(double);
> extern double floor_(double);
>
> double x = 1.5;
> double y, y_;
>
> void foo() {
>
>   double y = floor(x);
>   double y_ = floor_(x);
> }
>
>
>  /local/llvmpb_config/install/**bin/clang floor1.c -o floor1.llc
> -emit-llvm -S
>
> The attributes for floor and floor_ are different.


This is expected; we recognise 'floor' as a builtin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130726/33708733/attachment.html>


More information about the cfe-dev mailing list