Re[4]: [cc65] Bugs?

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-03-05 21:31:33


Hello Mike,

Tuesday, March 05, 2002, 9:26:07 PM, you wrote:

MM> 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.

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

its implicitly int in this case if my memory serves me right....

-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


----------------------------------------------------------------------
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:31:48 CET