[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-bugs
Subject: [LLVMbugs] [Bug 13236] New: Microsoft compatibility: support __super specifier to access members of
From: bugzilla-daemon () llvm ! org
Date: 2012-06-29 8:36:55
Message-ID: bug-13236-206 () http ! llvm ! org/bugs/
[Download RAW message or body]
http://llvm.org/bugs/show_bug.cgi?id=13236
Bug #: 13236
Summary: Microsoft compatibility: support __super specifier to
access members of base classes
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs@nondot.org
ReportedBy: avakar@ratatanek.cz
CC: dgregor@apple.com, llvmbugs@cs.uiuc.edu
Classification: Unclassified
Official docs:
http://msdn.microsoft.com/en-us/library/94dw1w7x%28v=vs.80%29.aspx
Unofficially, the grammar seems to be
qualified-id:
'__super' '::' unqualified-id
__super can't be chained (i.e. __super::__super is invalid).
__super is only valid in member function scope (in particular, the following is
invalid:
struct A { typedef int t; };
struct B: A {
typedef __super::t u; // error
}
).
The unqualified-id is looked up in all the base classes and the results are
merged.
struct A { void foo(long); };
struct B { void foo(int); };
struct C: A, B {
void test() {
__super::foo(1); // OK: calls B::foo
}
};
The result may name a type-name.
struct A { typedef int t; };
struct B: A {
typedef long t;
void test() {
__super::t v; // OK: the type of 'v' is 'int'
}
};
__super is enabled only when compiling without /Za (disable language
extensions).
--
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.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic