[Bug c++/37806] CV-qualifiers on function typedef's are inconsistently accepted depending on typedef scope

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 11 20:00:00 GMT 2008



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-10-11 19:58 -------
EDG accepts the code.  With GCC 4.3 and newer we reject the code with

t.C: In function ‘int main()’:
t.C:32: error: cannot declare variable ‘s’ to be of abstract type ‘S3’
t.C:21: note:   because the following virtual functions are pure within ‘S3’:
t.C:16: note:   virtual void S2::f(int)

GCC 4.2 has this in addition to the CV error.  Of course the reason is the
same.

GCC never accepted the code, so this is not a regression.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2008-10-11 19:58:47
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37806



More information about the Gcc-bugs mailing list