public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13941] New: ICE on illegal (void *) &&
@ 2004-01-31 2:57 gcc-bug at vogtner dot de
2004-01-31 3:11 ` [Bug c++/13941] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: gcc-bug at vogtner dot de @ 2004-01-31 2:57 UTC (permalink / raw)
To: gcc-bugs
1 class X {
2 };
3
4 void fun (void *p)
5 {
6 }
7
8 template<typename T>
9 X &operator<< (X &x, T s)
10 {
11 fun ((void *) &&x);
12 return x;
13 }
14
15 int main (int argc, char **argv)
16 {
17 X x;
18 x << 3.;
19 }
> g++ a.cc
a.cc: In function `X& operator<<(X&, T) [with T = double]':
a.cc:11: internal compiler error: in find_function_data, at function.c:310
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE on illegal (void *) &&
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bug at vogtner dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13941
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/13941] ICE on illegal (void *) &&
2004-01-31 2:57 [Bug c++/13941] New: ICE on illegal (void *) && gcc-bug at vogtner dot de
@ 2004-01-31 3:11 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-31 3:11 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-31 3:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-31 2:57 [Bug c++/13941] New: ICE on illegal (void *) && gcc-bug at vogtner dot de
2004-01-31 3:11 ` [Bug c++/13941] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).