[llvm-bugs] [Bug 33856] New: clang ignores #pragma CX_LIMITED_RANGE

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 19 16:06:40 PDT 2017


            Bug ID: 33856
           Summary: clang ignores #pragma CX_LIMITED_RANGE
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: smcallis at gmail.com
                CC: llvm-bugs at lists.llvm.org

At least on clang 3.8.0-2 (Ubuntu 16.04), this code:

//#pragma CX_LIMITED_RANGE on

#include <stdio.h>
#include <stdlib.h>
#include <complex.h>

int main() {
    float complex a = rand() + I*rand();
    float complex b = rand() + I*rand();
    float complex c = a*b;
    printf("res: %f,%f\n", __real__ c, __imag__ c);

generates identical assembly with and without the pragma on.  I'm not sure the
implementation is _required_ to simplify complex arithmetic with it on, but I
think that's the spirit of the standard.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170719/8b262e40/attachment.html>

More information about the llvm-bugs mailing list