[llvm-bugs] [Bug 40543] New: double floating point suffixes D and d not accepted

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 30 18:16:01 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40543

            Bug ID: 40543
           Summary: double floating point suffixes D and d not accepted
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

The line

double d = 0.4D;

causes clang to barf with

test.c:2:14: error: invalid suffix 'D' on floating constant

gcc accepts that code, and this seems to be the correct behavior at least for
C99+.
(see this gcc bug report from 10 years ago:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39027)

-- 
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/20190131/98de0ed1/attachment.html>


More information about the llvm-bugs mailing list