Added a more detailed explanation of the --standard command line switch.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4656 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2010-05-01 16:22:54 +00:00
parent 0695f39611
commit c24fc36d36

View file

@ -49,12 +49,12 @@ The compiler may be called as follows:
<tscreen><verb> <tscreen><verb>
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
Usage: cc65 [options] file Usage: cc65 [options] file
Short options: Short options:
-Cl Make local variables static -Cl Make local variables static
-Dsym[=defn] Define a symbol -Dsym[=defn] Define a symbol
-E Stop after the preprocessing stage -E Stop after the preprocessing stage
-I dir Set an include directory search path -I dir Set an include directory search path
-O Optimize code -O Optimize code
-Oi Optimize code, inline more code -Oi Optimize code, inline more code
-Or Enable register variables -Or Enable register variables
@ -283,15 +283,29 @@ Here is a description of all the command line options:
This option allows to set the language standard supported. The argument is This option allows to set the language standard supported. The argument is
one of one of
<itemize> <descrip>
<item>c89 <tag/c89/
<item>c99 This disables anything that is illegal in C89/C90. Among those things
<item>cc65 are <tt>//</tt> comments and the non-standard keywords without
</itemize> underscores. Please note that cc65 is not a fully C89 compliant compiler
despite this option. A few more things (like floats) are missing.
Please note that the compiler does not support the c99 standard and never <tag/c99/
will. c99 mode is actually c89 mode with a few selected c99 extensions This enables a few features from the C99 standard. With this option,
(// comments for example). <tt>//</tt> comments are allowed. It will also cause warnings and even
errors in a few situations that are allowed with <tt/--standard c89/.
For example, a call to a function without a prototype is an error in
this mode.
<tag/cc65/
This is the default mode. It is like c99 mode, but additional features
are enabled. Among these are "void data", non-standard keywords without
the underlines, unnamed function parameters and the requirement for
main() to return an int.
</descrip>
Please note that the compiler does not support the C99 standard and never
will. c99 mode is actually c89 mode with a few selected C99 extensions.
<label id="option-standard"> <label id="option-standard">