Re: [cc65] testsuite - compiler bugs!

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-03-06 00:29:38


On Wednesday 05 March 2003 18:19, Ullrich von Bassewitz wrote:
> Hi!
>
> On Wed, Mar 05, 2003 at 03:40:49PM +0100, Groepaz wrote:
> > char *a="bla";
> > and
> > char *a={"bla"};
> >
> > should be threatened as beeing exactly the same.... cc65 messed something
> > up here last time i checked.
>
> cc65 doesn't accept the latter, but it doesn't generate wrong code as with
> the indexing. The strange thing (for me) is that the second initialization
> seems to be valid C. Looks like curly braces are accepted around anything
> when initializing, so even

to be honest, the first time i have ever seen (and used) the first 
initialization was when i first used cc65 :o) if i remember right, even k&r 
used the second variation in the examples for their "programming c" book.

>
>         unsigned a = { 3 };
>
> is valid. I will have to look at it.

indeed.... that thing actually has made it kinda hard to compile most of the 
testsuite programs without modifying them.... eg

typedef struct
{
	char a,b;
	char c[2];
} foo;

foo bar={1,2,3,4};
foo bar={{1,2},{3,4}};
...etc
[insert many combinations of the above, with curly braces at different places]

it should be all the same... the compiler however doesnt accept many of them.

i have to admit that many of those initialized structs looked weird to me 
aswell....however since the compile fine with gcc i suspect them beeing valid 
c. (also the age of the testprograms, many written in k&r style, speaks for 
that).

>
> > ...ok, maybe i should check tonights snapshot and see if it passes the
> > tests now? :O)
>
> The bit operators should work now, the indexing problem is still not fixed.
> I don't think this is really important, because the code is so weird.

you never know what impact it has on other code-snippets :o) (theres some more 
quite weird code in those testprograms :O))

gpz
----------------------------------------------------------------------
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 : 2003-03-06 00:23:59 CET