[Bug c++/19894] pointer-to-void member not rejected in template

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jun 7 19:40:00 GMT 2005


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-06-07 19:39 -------
No, it's really a bug.

In 3.9.2 [basic.compound] we have:

  Compound types can be constructed in the following ways:
  [...]
  - pointers to void or objects or functions (...) of a given type,
  [...]
  - pointers to non-static class members, which identify members of a given
    type within objects of a given class.

This also shows that no pointers to members of type void are allowed:
a) There is no such thing as a void data member in a class.
b) For regular pointers "void" is added explicitly, but not for
   pointers to members.

BTW, the compiler rejects them in the non-template case.
This is only an omission in the template case.

I'm testing a patch.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |reichelt at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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



More information about the Gcc-bugs mailing list