[llvm-bugs] [Bug 25013] New: [MS] #pragma vtordisp inside functions is not allowed

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 1 03:56:37 PDT 2015


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

            Bug ID: 25013
           Summary: [MS] #pragma vtordisp inside functions is not allowed
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: d.zobnin.bugzilla at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Clang fails to compile the following test, while MSVC compiles it without any
diagnostics:

$ cat 1.cpp

struct A {
  virtual ~A() {};
  virtual void foo() {};
  int a;
};

template <class T> struct B : virtual A {
  virtual ~B() {};
  virtual void bar() {};
  int b;
};

int main() {
  #pragma vtordisp(push, 2)
  B<int> obj;
  #pragma vtordisp(pop)
  return 0;
}


$ clang 1.cpp

1.cpp:14:11: error: expected expression
  #pragma vtordisp(push, 2)
          ^
1.cpp:16:11: error: expected expression
  #pragma vtordisp(pop)
          ^
2 errors generated.


Denis Zobnin
================
Software Engineer
Intel Compiler Team
Intel

-- 
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/20151001/d6033a6e/attachment.html>


More information about the llvm-bugs mailing list