This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
BUG REPORT FOR GCC 3.2: Conditional expressions as L-Values
- From: Blai Bonet <bonet at CS dot UCLA dot EDU>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: bonet at CS dot UCLA dot EDU, daylin at CS dot ColoState dot EDU
- Date: Wed, 02 Jul 2003 15:04:08 -0700
- Subject: BUG REPORT FOR GCC 3.2: Conditional expressions as L-Values
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;
}