On Sat, May 01, 2010 at 05:56:36PM +0200, Spiro Trikaliotis wrote: > > - Instead of _CMT(str) macro consuming str, how about a _CMT() > > mac that turns the just inserts a ';' or a '//' ? > > Because neither ca65 nor cc65 would allow this. (cc65 targets C90, thus, > no "//" comment; ca65 does not recognize it, either). > > Just test it out yourself! He talks about either inserting a ';' (for ca65) or '//' (for cc65), and both works. Just test it out yourself:-) More seriously: cc65 has three modes that are switchable using the --standard command line option. c89 This disables anything that is illegal in C89/c90. Among those things are // comments and the non-standard keywords without underscores. Please note that cc65 is not a c89 compliant compiler despite this option. A few more things (like floats) are missing. c99 This a enables a few features from the c99 standard. With this option, // comments are allowed. It will also cause warnings and even errors in a few situations that are allowed with --standard c89. For example, a call to a function without a prototype is an error in this mode. cc65 This is the default mode. It is like c99 mode, but additional features are enabled. Among these is "void data", non-standard keywords without the underlines, unnamed function parameters and the requirement for main() to return an int. (maybe this list should go into the docs or the wiki). So without additional switches, // comments are definitely allowed. c89 will disable them, but it will also disable some useful features and warnings, so I would only recommend it for sources that definitely need it. Regards Uz -- Ullrich von Bassewitz uz@musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Sat May 1 18:14:40 2010
This archive was generated by hypermail 2.1.8 : 2010-05-01 18:14:43 CEST