[cxx-abi-dev] Missing mangling of elaborated type specifiers
Hubert Tong
hstong at ca.ibm.com
Thu Mar 20 04:02:11 UTC 2014
It seems that the ABI is missing mangling for elaborated type specifiers.
Background:
As mentioned in Core Issue 1162, elaborated-type-specifiers may be used to
cause SFINAE.
The proposed wording for Core Issue 1668
<http://jmaurer.awardspace.info/wg21/proposed_resolution_core-1668.html>
clarifies the various aspects of function signatures and the relationship
of being functionally equivalent.
Using Clang 3.4, the program below unexpectedly terminates from an uncaught
exception.
depElaboratedA.cc:
struct B { enum ty { BtyA }; };
template <typename T> int foo(enum T::ty *) { static int x = 0; return +
+x; }
int bar() { return foo<B>(0); }
template <typename T> int foo(typename T::ty *) { static int x = 0; return
++x; }
depElaboratedB.cc:
struct B { enum ty { BtyA }; };
template <typename T> int foo(typename T::ty *) { static int x = 0; return
++x; }
int zip() { return foo<B>(0); }
int bar();
int main() {
bar();
if (zip() != 1) throw 0;
}
Thanks,
Hubert Tong
Hubert S K Tong
IBM Canada Ltd
8200 Warden Ave, Markham ON L6G 1C7
Canada
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20140320/ccb418a9/attachment.html>
More information about the cxx-abi-dev
mailing list