http://llvm.org/bugs/show_bug.cgi?id=9050
Summary: access specifier ignored for destructor
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
clang version 2.9 (trunk 123315)
Target: i386-pc-linux-gnu
% cat test.cc
class a
{
public:
void killme() const
{
delete this;
}
protected:
~a()
{
}
};
int main()
{
const a* x = new a;
delete x;
}
% clang++ -Wall -W test.cc
%
clang++ seems to ignore that "protected:" specifier.
Here is the output from g++, for comparison:
% g++ -Wall -W test.cc
test.cc: In function ‘int main()’:
test.cc:10: error: ‘a::~a()’ is protected
test.cc:19: error: within this context
--
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
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs