From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-08-29 11:41:49
On Fri, Aug 29, 2003 at 09:48:57AM +0200, Groepaz wrote: > gives "illegal character constant" for the '\77' [...] > '\v' gives "illegal character constant" here I've fixed both and added a bit more error recovery in case of illegal character constants. BTW: '\v' is the "vertical tab" character. This seems to be something, very old terminals had, but this was before my time (so it must be quite old:-) '\b' is the backspace and this one is still in use today. > f(i) > { > i=f()+f(); > } [...] > int test(char *s); > > test(*s) > char *s; > { > } While those could be fixed, I don't think it's a good idea, because both examples show problematic uses, were the source code should get changed, not the compiler. Old style function decls are deprecated in C99 and will be removed with the next version of the standard, so my stand is to fix important things, not obscure features. In case of the former, I would even say, the code violates the C99 standard which says in 6.9.1.8: If a function that accepts a variable number of arguments is defined without a parameter type list that ends with the ellipsis notation, the behavior is undefined. (but then, C99 does also remove "implicit int", so both function decls would be invalid according to the new standard). > the tests that compile still dont work due to some appearent problem in the > posix directory and/or cbm file i/o stuff.... mpf If you can give me a few more hints, or a short piece of non working code, I will try to fix it. > - functions that return structs seem to translate correctly now (i had to > disable this before) C functions still cannot return structs, but assembler functions can if the size of the struct is one of 1, 2 or 4 (it is returned in the primary register). > - even enabling "functions can return structs" doesnt result in an error (?!?) > does that really have been fixed or is that testsuite playing tricks on me? The compiler is supposed to issue an error if a C function tries to return a structure. My own tests show that this is the case, but maybe that the test suite is somewhat more creative. Can you send me the code that returns a structure which is accepted by the compiler? > - several small problems with initializing structs and/or using curly braces > in a "creative" way seem to be gone At least there is progress in a few areas :-) Thanks for doing all the tests! Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-08-29 11:42:09 CEST