This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13941] ICE on illegal (void *) &&
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2004 03:11:13 -0000
- Subject: [Bug c++/13941] ICE on illegal (void *) &&
- References: <20040131025745.13941.gcc-bug@vogtner.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-31 03:11 -------
Actually this is invalid standard C++ but GNU adds an extension to take the address of an label by
&&label which is what is happening here, if you used -pedantic-errors it would error out. Anyways
this is fixed for 3.4.0. Nothing before 3.4.0 worked right. Yes this is still invalid as you do not
define a label called x though. In fact here is a case which is valid GNU C++ which ICEs in version
before 3.4.0:
class x{};
void fun(void*);
template<typename T>
x &operator<< (x &x, T s)
{
fun ((void *) &&x);
x:
return x;
}
int main()
{
x t;
t << t;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13941