This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14267] New: ICE on invalid, cast to lval related


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]