]> git.sur5r.net Git - cc65/blobdiff - doc/cc65.sgml
Lynx changes by Karri Kaksonen.
[cc65] / doc / cc65.sgml
index 6927ffc5c81f11d1b511252e4e6f6bca2638f336..a0a01c1c432912a7cd995bf61945bdbd40893be0 100644 (file)
@@ -131,7 +131,7 @@ Here is a description of all the command line options:
   This options allows finer control about speed vs. size decisions in the code
   generation and optimization phases. It gives the allowed size increase
   factor (in percent). The default is 100 when not using <tt/-Oi/ and 200 when
-  using <tt/-Oi/ (<tt/-Oi/ is the same as <tt/--codesize&nbsp;200/).
+  using <tt/-Oi/ (<tt/-Oi/ is the same as <tt/-O --codesize&nbsp;200/).
 
 
   <tag><tt>--cpu CPU</tt></tag>
@@ -243,6 +243,10 @@ Here is a description of all the command line options:
   <item>cc65
   </itemize>
 
+  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
+  (// comments for example).
+
 
   <tag><tt>-t target, --target target</tt></tag>
 
@@ -336,7 +340,7 @@ Here is a description of all the command line options:
   runtime functions would have been called, even if the generated code is
   larger. This will not only remove the overhead for a function call, but will
   make the code visible for the optimizer. <tt/-Oi/ is an alias for
-  <tt/--codesize&nbsp;200/.
+  <tt/-O --codesize&nbsp;200/.
 
   <tt/-Or/ will make the compiler honor the <tt/register/ keyword. Local
   variables may be placed in registers (which are actually zero page
@@ -403,37 +407,19 @@ search path for include files on startup.
 
 <sect>Differences to the ISO standard<p>
 
+Apart from the things listed below, the compiler does support additional
+keywords, has several functions in the standard headers with names outside the
+reserved namespace and a few syntax extensions. All these can be disabled with
+the <tt><ref id="option--standard" name="--standard"></tt> command line
+option. Its use for maximum standards compatibility is advised.
+
 Here is a list of differences between the language, the compiler accepts,
 and the one defined by the ISO standard:
 
 <itemize>
 
-<item> The compiler allows unnamed parameters in parameter lists. The
-       compiler will not issue warnings about unused parameters that don't
-       have a name. This feature can be disabled with the <tt><ref
-        id="option--standard" name="--standard"></tt> command line option.
-       <p>
-<item> The compiler has some additional keywords:
-       <p>
-       <itemize>
-       <item><tt/asm/
-       <item><tt/__asm__/
-       <item><tt/fastcall/
-       <item><tt/__fastcall__/
-       <item><tt/__AX__/
-       <item><tt/__EAX__/
-       <item><tt/__func__/
-       <item><tt/__attribute__/
-       </itemize>
-       <p>
-       The keywords without the underlines can be disabled with the
-        <tt><ref id="option--standard" name="--standard"></tt> command line
-        option.
-       <p>
 <item> The datatypes "float" and "double" are not available.
        <p>
-<item> The compiler does not support bit fields.
-       <p>
 <item>         C Functions may not return structs (or unions), and structs may not
         be passed as parameters by value. However, struct assignment *is*
        possible.
@@ -442,6 +428,10 @@ and the one defined by the ISO standard:
        conventions (see below).  It means that you must not mix pointers to
        those functions with pointers to user-written, not-fastcall functions.
        <p>
+<item> The <tt/volatile/ keyword doesn't have an effect. This is not as bad
+        as it sounds, since the 6502 has so few registers that it isn't
+        possible to keep values in registers anyway.
+       <p>
 </itemize>
 
 There may be some more minor differences I'm currently not aware of. The
@@ -599,7 +589,7 @@ The compiler defines several macros at startup:
 
   <tag><tt>__APPLE2ENH__</tt></tag>
 
-  This macro is defined if the target is the enhanced Apple // (-t apple2enh).
+  This macro is defined if the target is the enhanced Apple //e (-t apple2enh).
 
   <tag><tt>__ATARI__</tt></tag>
 
@@ -1079,6 +1069,13 @@ a future version. Instead use the format specifiers from the table above:
 <p>
 
 
+<sect>Implementation-defined behavior<p>
+
+This section describes the behavior of cc65 when the standard describes the
+behavior as implementation-defined.
+
+(to be done)
+
 <sect>Bugs/Feedback<p>
 
 If you have problems using the compiler, if you find any bugs, or if you're