From: Groepaz (groepaz_at_gmx.net)
Date: 2003-09-01 20:53:30
On Monday 01 September 2003 13:39, Ullrich von Bassewitz wrote: > Same here. In C, structs do always have a separate namespace, so the > "struct" keyword is mandatory (if no typedef is used). ah i see...i always use typedefs myself :) > The cc65 preprocessor is cheating, when it comes to macros calling each > other. Instead of disallowing the expansion of a macro that has already > been expanded in an upper layer, an upper limit on macro expansions is > applied. The expression you have runs into this limit. As a quick > workaround, I will increase the hardcoded number. The correct solution > would be to fix macro expansion, but this will take more time. ok :) > There is not only a subtle difference but a big one: > > const struct foo* bar; > defines a pointer to a constant struct foo. > > struct foo* const bar; > defines a constant pointer to struct foo. [...] many thanks, that explains a lot :) now i'm curious though that gcc generates working code for some combinations that should not work according to your explaination - and doesnt even throw a warning (at -Wall -W)... mmmh :) should i try --ansi --pedantic too? :=P cc65 ignores both const and volatile though right? > If you need some practice on this, you can try all combinations of const > and volatile for "struct q_t*** q" :-) LOL :o) i'll probably write down a 2d version of it though i guess :=)) gpz ---------------------------------------------------------------------- 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-09-01 20:59:18 CEST