This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15269] __attribute__((deprecated)) broken with inline, ignored with pure virtual, misreported after definition


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]