This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14267] New: ICE on invalid, cast to lval related
- From: "mrs at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2004 23:36:20 -0000
- Subject: [Bug c++/14267] New: ICE on invalid, cast to lval related
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This gets an ICE:
gcc version 3.5.0 20040218 (experimental)
/tmp/t.cc: In function `int main()':
/tmp/t.cc:9: error: ISO C++ forbids cast to non-reference type used as lvalue
/tmp/t.cc:9: internal compiler error: in build_modify_expr, at cp/typeck.c:5098
Please submit a full bug report,
class foo {
public: static int& x;
};
int temp;
int& foo::x=temp;
int main() {
int x = 3;
&foo::x = x;
return 0;
}
--
Summary: ICE on invalid, cast to lval related
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrs at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin7.2.0
GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14267