This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12877] New: conditional as lvalue gives wrong warning
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Nov 2003 18:21:16 -0000
- Subject: [Bug c/12877] New: conditional as lvalue gives wrong warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12877
Summary: conditional as lvalue gives wrong warning
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
falk@juist:~% cat bug1.c
void f (void) {
char c, d;
(1 ? c : d) = 0;
}
falk@juist:~% gcc -c bug1.c
bug1.c: In function `f':
bug1.c:3: warning: use of cast expressions as lvalues is deprecated
But it's a conditional, not a cast, and I think this extension isn't
deprecated.