Re: Re[2]: [cc65] Bugs?

Date view Thread view Subject view

From: Mike McCarty (jmccarty_at_ssd.usa.alcatel.com)
Date: 2002-03-05 21:26:07


On Tue, 5 Mar 2002, groepaz wrote:

> Hello Mike,
> 
> Tuesday, March 05, 2002, 4:52:54 PM, you wrote:
> 
> MM> On Tue, 5 Mar 2002, Piotr Fusik wrote:
> 
> MM> [snip]
> 
> >> struct s a;
> >> const struct s *p;
> >> a = *p;               // Error: Incompatible types
> >> 
> >> and here:
> >> 
> >> struct s a,b,c;
> >> a = b = c;    // Error: Invalid lvalue in assignment
> 
> 
> MM> Is this supposed to be a complete example? You have an incomplete type
> MM> struct s, which is never completed. The compiler is justified in
> MM> producing a diagnostic. It does not know how many bytes to move. The
> MM> diagnostics might perhaps be a little more indicative of the problem.
> 
> mmmh, actually i think both are seldom used, but valid
> expressions...... cc65 seems to be pretty picky about such stuff,
> especially with structs that arent defined and/or initialized in a
> "good" fashion.... the c-reference test from the testsuite i am
> working on has a load of problems with that stuff aswell.

The point I was making is that I don't see where struct a is completed.
The compiler can't generate code to move one struct to another when it
does not have enough information to ascertain the size of the struct.
The expression is valid, but the compiler cannot generate code.

Mike
-- 
char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I don't speak for Alcatel      <- They make me say that.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-03-05 21:27:02 CET