This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19894] pointer-to-void member not rejected in template
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2005 19:39:59 -0000
- Subject: [Bug c++/19894] pointer-to-void member not rejected in template
- References: <20050211020409.19894.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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