public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11427] New: Problem with conditional expressions as l-values
@ 2003-07-03 19:33 bonet at cs dot ucla dot edu
  2003-07-05 17:07 ` [Bug c/11427] " kazu at cs dot umass dot edu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bonet at cs dot ucla dot edu @ 2003-07-03 19:33 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11427

           Summary: Problem with conditional expressions as l-values
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonet at cs dot ucla dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: SPARC/SOLARIS/5.8
  GCC host triplet: SPARC/SOLARIS/5.8
GCC target triplet: SPARC/SOLARIS/5.8

The program below compiles fine with gcc-2.95.3
but it does not compiles with gcc-3.2, producing
the error message:

p.c: In function `main':
p.c:14: invalid lvalue in assignment

The version of gcc I am using is (as reported with -v):

Reading specs from /net/peking/caracas/usr/local/bin/../lib/gcc-lib/sparc-sun-s
olaris2.9/3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.2

------- p.c ---------

#define PAIR(x,y)  ((x)<=(y) ? H2Cost[(x)][(y)-(x)] : H2Cost[(y)][(x)-(y)])

struct cost_s
{
  unsigned long plus;
  unsigned long max;
} cost_s;
typedef struct cost_s cost_t;

main()
{
  int p,q;
  cost_t **H2Cost;
  PAIR(p,q).max = 0;
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-11-09  2:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 19:33 [Bug c/11427] New: Problem with conditional expressions as l-values bonet at cs dot ucla dot edu
2003-07-05 17:07 ` [Bug c/11427] " kazu at cs dot umass dot edu
2003-07-06  1:20 ` dhazeghi at yahoo dot com
2003-07-06  1:21 ` pinskia at physics dot uc dot edu
2003-07-06  1:33 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-07-06  1:53 ` jsm at polyomino dot org dot uk
2003-08-24 20:07 ` neroden at gcc dot gnu dot org
2003-11-05  4:25 ` pinskia at gcc dot gnu dot org
2003-11-09  2:12 ` 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).