[LLVMbugs] [Bug 12655] New: Fail to initialize class members whose type is function pointer with exception type qualification

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 25 11:13:32 PDT 2012


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

             Bug #: 12655
           Summary: Fail to initialize class members whose type is
                    function pointer with exception type qualification
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: weimingz at codeaurora.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8448
  --> http://llvm.org/bugs/attachment.cgi?id=8448
test code

Clangs is unable to compile the following code:

void func(void)  throw (int) ;

struct Foo {
  void (*fp)(void) throw(int) ;
  void (&fr)(void) throw(int) ;
  Foo() :fp(func), fr(func) { }
};

Foo foo;

clang-arm-tip-x++ -c  func_ptr_exp.cpp 
func_ptr_exp.cpp:6:13: error: target exception specification is not superset of
source
  Foo() :fp(func), fr(func) { }
            ^
func_ptr_exp.cpp:6:23: error: target exception specification is not superset of
source
  Foo() :fp(func), fr(func) { }
                      ^
2 errors generated.


Without "throw (int)", it passes.

clang -v
clang version 3.1 (branches/release_31 154941)
Target: arm-none-linux-gnueabi
Thread model: posix

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