http://llvm.org/bugs/show_bug.cgi?id=2963
Neil Booth <[EMAIL PROTECTED]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[EMAIL PROTECTED]
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #4 from Neil Booth <[EMAIL PROTECTED]> 2008-10-28 08:41:29 ---
My front end gives
"/tmp/bug.c", line 14: error: a floating constant in an integer constant
expression must be cast to integer type
SOME_VALUE= FLOAT_TO_SHORT_FIXED(0.1)
^
1 error found compiling "/tmp/bug.c".
which is perhaps slightly more helpful. There isn't a good way around this -
the standard is reluctant to impose any hard requirements on compile-time
calculation of target floating point arithmetic, viewing it as too much of a
burden in general on implementations, although for IEEE targets it's not too
hard to do perfectly with about 1000 lines of code (and clang has this code).
But that is the reason for this constraint :(
Perhaps clang should accept with a warning, unless pedantic?
Reopening as it seems others agree.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs