This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15269] __attribute__((deprecated)) broken with inline, ignored with pure virtual, misreported after definition
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2004 18:39:54 -0000
- Subject: [Bug c++/15269] __attribute__((deprecated)) broken with inline, ignored with pure virtual, misreported after definition
- References: <20040503180849.15269.eddy@opera.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-03 18:39 -------
Confirmed. There are multiple problems:
----------
struct B {
virtual int foo() __attribute__((deprecated));
};
int main(void) {
((B*)0)->foo();
}
----------
The compiler should warn, but doesn't. It does if the 'virtual' is
removed.
Problem number two is this:
------------
struct B {
int foo() __attribute__((deprecated)) {};
};
------------
This doesn't compile with gcc up to 3.3.4. However, it is already fixed
with the new parser in 3.4.0, so this is ok now.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-05-03 18:39:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15269