[LLVMbugs] [Bug 18194] New: Incorrect error when virtually inheriting from standard exception classes.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 9 14:15:33 PST 2013


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

            Bug ID: 18194
           Summary: Incorrect error when virtually inheriting from
                    standard exception classes.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: natalie at lifewanted.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11698
  --> http://llvm.org/bugs/attachment.cgi?id=11698&action=edit
Example showing virtual inheritance issue.

The code attached correctly compiles with Apple's Clang v5.0 on OS 10.9 and on
GCC 4.8.1 on Ubuntu 13.10. However, using Clang v3.4 (the most recent
available) on Ubuntu 13.10 produces these errors:

    clangClass.cpp:24:7: error: 'CompilerError' attribute cannot be applied to
types
    class CompilerError : VirtualException, std::logic_error {
          ^
    clangClass.cpp:24:7: error: 'CompilerError' attribute cannot be applied to
types
    class CompilerError : VirtualException, std::logic_error {
          ^
    clangClass.cpp:24:7: error: 'CompilerError' attribute cannot be applied to
types
    class CompilerError : VirtualException, std::logic_error {
          ^
    3 errors generated.

I believe these errors to be a mistake as the code makes no use of attributes
and compiles correctly on GCC. I am compiling with the command `clang++
-std=c++11 -c clangClass.cpp`.

I have posted this issue to StackOverflow as well, in hopes that it was my
error not Clang's, but it appears to be Clang.

http://stackoverflow.com/questions/20461921/clang-compiler-error-with-virtual-inheritance

-- 
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/20131209/8b14e0ce/attachment.html>


More information about the llvm-bugs mailing list