* doc/sdccman.lyx: fixed unmeant removal of spaces
[fw/sdcc] / doc / sdccman.lyx
index 505fa0b44ff8caa5c2673a51744ca192c7b5be82..629c0c2cbc824d42d78fd460db596fb9b0d3dd58 100644 (file)
@@ -104,7 +104,7 @@ SDCC Compiler User Guide
 \begin_layout Date
 
 \size normal
-SDCC 2.7.4
+SDCC 2.7.5
 \size footnotesize
 
 \newline
@@ -36640,6 +36640,135 @@ t', 'near', 'nonbanked', 'pdata', 'reentrant', 'sbit', 'sfr', 'shadowregs',
  '__data' instead of 'data'.
 \end_layout
 
+\begin_layout Itemize
+integer promotion of variable arguments is not performed if the argument
+ is explicitly taypecasted unless the
+\series bold
+ -
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-std-c89
+\begin_inset LatexCommand \index{-\/-std-c89}
+
+\end_inset
+
+ or -
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-std-c99
+\begin_inset LatexCommand \index{-\/-std-c99}
+
+\end_inset
+
+
+\series default
+ command line options are used.
+\end_layout
+
+\begin_deeper
+\begin_layout Verse
+
+\family typewriter
+void vararg_func (char *str, ...) { atr; }
+\newline
+
+\newline
+void main (void)
+\newline
+{
+\newline
+\InsetSpace ~
+\InsetSpace ~
+char c = 10;
+\newline
+
+\newline
+\InsetSpace ~
+\InsetSpace ~
+/* argument
+ u is promoted to int before
+\newline
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+* passing to function */
+\newline
+\InsetSpace ~
+\InsetSpace ~
+vararg_func (
+\begin_inset Quotes sld
+\end_inset
+
+%c
+\begin_inset Quotes srd
+\end_inset
+
+, c);
+\newline
+
+\newline
+\InsetSpace ~
+\InsetSpace ~
+/* argument u is not promoted to int,
+\newline
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+* it is passed as char to function
+\newline
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+*
+ if --std-cXX is not defined;
+\newline
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+* is promoted to int before passing
+\newline
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+* to function
+ if --std-cXX is defined */
+\newline
+\InsetSpace ~
+\InsetSpace ~
+vararg_func (
+\begin_inset Quotes sld
+\end_inset
+
+%bc
+\begin_inset Quotes srd
+\end_inset
+
+, (char)u);
+\newline
+}
+\end_layout
+
+\end_deeper
 \begin_layout Section
 Cyclomatic Complexity
 \begin_inset LatexCommand \index{Cyclomatic complexity}