[LLVMbugs] [Bug 23004] New: DR 1510 not implemented

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 23 16:49:49 PDT 2015


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

            Bug ID: 23004
           Summary: DR 1510 not implemented
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hstong at ca.ibm.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The "const" is supposed to be ignored according to
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1510.
The error indicates that Clang is keeping the "const" around.

### SOURCE (<stdin>):
extern int &&a;
typedef const decltype(a) TR;
typedef int &&TR;


### COMPILER INVOCATION:
clang++ -cc1 -std=c++14 -x c++ -


### ACTUAL OUTPUT:
<stdin>:3:15: error: typedef redefinition with different types ('int &&' vs
'const decltype(a)' (aka 'int &&const'))
typedef int &&TR;
              ^
<stdin>:2:27: note: previous definition is here
typedef const decltype(a) TR;
                          ^
1 error generated.


### EXPECTED OUTPUT:
(Compiles successfully).


### COMPILER VERSION INFO:
clang version 3.7.0 (trunk 232951)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation:
/usr/local/gcc-4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2
Selected GCC installation:
/usr/local/gcc-4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2
Candidate multilib: .;@m64
Selected multilib: .;@m64

-- 
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/20150323/f2bbe059/attachment.html>


More information about the llvm-bugs mailing list