[LLVMbugs] [Bug 9585] New: Support __decltype() as a synonym for decltype() for gcc compatibility

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 29 15:12:48 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9585

           Summary: Support __decltype() as a synonym for decltype() for
                    gcc compatibility
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jyasskin at google.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


$ cat test2.cc
#include <algorithm>
$ ./clang++  -nostdinc++ -isystem /opt/local/include/gcc46/c++/ -isystem
/opt/local/include/gcc46/c++/x86_64-apple-darwin10/ -c test2.cc
...
/opt/local/include/gcc46/c++/bits/stl_algobase.h:731:32: error: expected ';' in
'for' statement specifier
      for (__decltype(__n + 0) __niter = __n;
                               ^
...
20 errors generated.
$ g++-mp-4.6 -c test2.cc
$ 

Note that this is _not_ compiling in C++0x mode.

__decltype only appears twice in libstdc++-4.6.0, so arguably we should just
get gcc to remove it for 4.6.1, but if clang can support it directly that'll
make it easier for early adopters.

-- 
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.



More information about the llvm-bugs mailing list