Reshaped doc's
[fw/sdcc] / doc / sdccman.html / node44.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3 <!--Converted with LaTeX2HTML 99.1 release (March 30, 1999)
4 original version by:  Nikos Drakos, CBLU, University of Leeds
5 * revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
6 * with significant contributions from:
7   Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8 <HTML>
9 <HEAD>
10 <TITLE>4.6 ANSI-Compliance</TITLE>
11 <META NAME="description" CONTENT="4.6 ANSI-Compliance">
12 <META NAME="keywords" CONTENT="sdccman">
13 <META NAME="resource-type" CONTENT="document">
14 <META NAME="distribution" CONTENT="global">
15
16 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17 <META NAME="Generator" CONTENT="LaTeX2HTML v99.1 release">
18 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20 <LINK REL="STYLESHEET" HREF="sdccman.css">
21
22 <LINK REL="next" HREF="node45.html">
23 <LINK REL="previous" HREF="node43.html">
24 <LINK REL="up" HREF="node38.html">
25 <LINK REL="next" HREF="node45.html">
26 </HEAD>
27
28 <BODY >
29 <!--Navigation Panel-->
30 <A NAME="tex2html925"
31  HREF="node45.html">
32 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
33 <A NAME="tex2html919"
34  HREF="node38.html">
35 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
36 <A NAME="tex2html913"
37  HREF="node43.html">
38 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> 
39 <A NAME="tex2html921"
40  HREF="node1.html">
41 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A> 
42 <A NAME="tex2html923"
43  HREF="node61.html">
44 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A> 
45 <BR>
46 <B> Next:</B> <A NAME="tex2html926"
47  HREF="node45.html">4.7 Cyclomatic Complexity</A>
48 <B> Up:</B> <A NAME="tex2html920"
49  HREF="node38.html">4. SDCC Technical Data</A>
50 <B> Previous:</B> <A NAME="tex2html914"
51  HREF="node43.html">4.5 External Stack</A>
52  &nbsp <B>  <A NAME="tex2html922"
53  HREF="node1.html">Contents</A></B> 
54  &nbsp <B>  <A NAME="tex2html924"
55  HREF="node61.html">Index</A></B> 
56 <BR>
57 <BR>
58 <!--End of Navigation Panel-->
59
60 <H2><A NAME="SECTION00056000000000000000">
61 4.6 ANSI-Compliance</A>
62 </H2>
63
64 <P>
65 Deviations from the compliancy.
66
67 <P>
68
69 <UL>
70 <LI>functions are not always reentrant.</LI>
71 <LI>structures cannot be assigned values directly, cannot be passed as
72 function parameters or assigned to each other and cannot be a return
73 value from a function, e.g.:&nbsp;
74 <BR>&nbsp;
75 <BR>
76 <TT>struct s { ... }; </TT>&nbsp;
77 <BR>
78 <TT>struct s s1, s2; </TT>&nbsp;
79 <BR>
80 <TT>foo() </TT>&nbsp;
81 <BR>
82 <TT>{ </TT>&nbsp;
83 <BR>
84 <TT>&nbsp;&nbsp;&nbsp;&nbsp;... </TT>&nbsp;
85 <BR>
86 <TT>&nbsp;&nbsp;&nbsp;&nbsp;s1 = s2 ; /* is invalid in SDCC although allowed
87 in ANSI */ </TT>&nbsp;
88 <BR>
89 <TT>&nbsp;&nbsp;&nbsp;&nbsp;... </TT>&nbsp;
90 <BR>
91 <TT>}</TT>&nbsp;
92 <BR>
93 <TT>struct s foo1 (struct s parms) /* is invalid in SDCC although
94 allowed in ANSI */ </TT>&nbsp;
95 <BR>
96 <TT>{ </TT>&nbsp;
97 <BR>
98 <TT>&nbsp;&nbsp;&nbsp;&nbsp;struct s rets; </TT>&nbsp;
99 <BR>
100 <TT>&nbsp;&nbsp;&nbsp;&nbsp;... </TT>&nbsp;
101 <BR>
102 <TT>&nbsp;&nbsp;&nbsp;&nbsp;return rets;/* is invalid in SDCC although allowed
103 in ANSI */ </TT>&nbsp;
104 <BR>
105 <TT>}</TT></LI>
106 <LI>'long long' (64 bit integers) not supported.</LI>
107 <LI>'double' precision floating point not supported.</LI>
108 <LI>No support for setjmp and longjmp (for now).</LI>
109 <LI>Old K&amp;R style function declarations are NOT allowed.
110 <BR>&nbsp;
111 <BR>
112 <TT>foo(i,j) /* this old style of function declarations */
113 </TT>&nbsp;
114 <BR>
115 <TT>int i,j; /* are valid in ANSI but not valid in SDCC */
116 </TT>&nbsp;
117 <BR>
118 <TT>{ </TT>&nbsp;
119 <BR>
120 <TT>&nbsp;&nbsp;&nbsp;&nbsp;... </TT>&nbsp;
121 <BR>
122 <TT>}</TT></LI>
123 <LI>functions declared as pointers must be dereferenced during the call.
124 <BR>&nbsp;
125 <BR>
126 <TT>int (*foo)();</TT>&nbsp;
127 <BR>
128 <TT>... </TT>&nbsp;
129 <BR>
130 <TT>/* has to be called like this */ </TT>&nbsp;
131 <BR>
132 <TT>(*foo)(); /* ansi standard allows calls to be made like
133 'foo()' */</TT></LI>
134 </UL>
135
136 <P>
137 <HR>
138 <!--Navigation Panel-->
139 <A NAME="tex2html925"
140  HREF="node45.html">
141 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
142 <A NAME="tex2html919"
143  HREF="node38.html">
144 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
145 <A NAME="tex2html913"
146  HREF="node43.html">
147 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> 
148 <A NAME="tex2html921"
149  HREF="node1.html">
150 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A> 
151 <A NAME="tex2html923"
152  HREF="node61.html">
153 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A> 
154 <BR>
155 <B> Next:</B> <A NAME="tex2html926"
156  HREF="node45.html">4.7 Cyclomatic Complexity</A>
157 <B> Up:</B> <A NAME="tex2html920"
158  HREF="node38.html">4. SDCC Technical Data</A>
159 <B> Previous:</B> <A NAME="tex2html914"
160  HREF="node43.html">4.5 External Stack</A>
161  &nbsp <B>  <A NAME="tex2html922"
162  HREF="node1.html">Contents</A></B> 
163  &nbsp <B>  <A NAME="tex2html924"
164  HREF="node61.html">Index</A></B> 
165 <!--End of Navigation Panel-->
166 <ADDRESS>
167 <I>Johan Knol</I>
168 <BR><I>2001-07-13</I>
169 </ADDRESS>
170 </BODY>
171 </HTML>