Article View: gnu.g++.bug
Article #1026bogus warning (g++ 2.2.2)
From: Marvin Solomon
Date: Mon, 05 Oct 1992 11:40
Date: Mon, 05 Oct 1992 11:40
23 lines
804 bytes
804 bytes
struct S {};
struct S1 {
operator S*();
};
struct T {
S1 p;
};
struct T1 {
T* operator ->();
};
void f(int i) {
S *s;
T1 t1;
S1 s1;
s = i ? s1 : s1; // no warning here
s1 = i ? t1->p : t1->p; // or here
s = i ? t1->p : t1->p; // warning here (line 21)
}
bug1.c:21: warning: ANSI C forbids use of conditional expressions as lvalues
Technical Details
Message-ID:
<9210052140.AA06442@gjetost.cs.wisc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.wisc.edu!solomonShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.wisc.edu!solomon From: solomon@cs.wisc.edu (Marvin Solomon) Subject: bogus warning (g++ 2.2.2) Message-ID: <9210052140.AA06442@gjetost.cs.wisc.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 5 Oct 1992 11:40:39 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 24