[llvm-bugs] [Bug 27147] New: Clang++ incorrectly treats T::T as T
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 30 15:59:16 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27147
Bug ID: 27147
Summary: Clang++ incorrectly treats T::T as T
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: ytj000 at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Hi there,
I think clang++ incorrectly accept the following code,
#include <assert.h>
#include <typeinfo>
int main() {
struct A {};
A::A::A::A::A::A::A::A a;
assert(typeid(a) == typeid(A));
}
both clang++, icc and GCC 4.4.7 accept this code. However GCC >= 4.5.3 rejects
this code. CMIIW, I don't think this is valid C++ code.
Here is compiling result from online compiler: https://godbolt.org/g/MLWej5
Regards,
Tianjiao
--
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/20160330/c10150a1/attachment.html>
More information about the llvm-bugs
mailing list