172 lines
5.1 KiB
HTML
172 lines
5.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
|
|
<!--Converted with LaTeX2HTML 99.1 release (March 30, 1999)
|
|
original version by: Nikos Drakos, CBLU, University of Leeds
|
|
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
|
* with significant contributions from:
|
|
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>4.6 ANSI-Compliance</TITLE>
|
|
<META NAME="description" CONTENT="4.6 ANSI-Compliance">
|
|
<META NAME="keywords" CONTENT="sdccman">
|
|
<META NAME="resource-type" CONTENT="document">
|
|
<META NAME="distribution" CONTENT="global">
|
|
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
|
<META NAME="Generator" CONTENT="LaTeX2HTML v99.1 release">
|
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
|
|
<LINK REL="STYLESHEET" HREF="sdccman.css">
|
|
|
|
<LINK REL="next" HREF="node45.html">
|
|
<LINK REL="previous" HREF="node43.html">
|
|
<LINK REL="up" HREF="node38.html">
|
|
<LINK REL="next" HREF="node45.html">
|
|
</HEAD>
|
|
|
|
<BODY >
|
|
<!--Navigation Panel-->
|
|
<A NAME="tex2html925"
|
|
HREF="node45.html">
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
|
|
<A NAME="tex2html919"
|
|
HREF="node38.html">
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
|
|
<A NAME="tex2html913"
|
|
HREF="node43.html">
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
|
|
<A NAME="tex2html921"
|
|
HREF="node1.html">
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
|
|
<A NAME="tex2html923"
|
|
HREF="node61.html">
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A>
|
|
<BR>
|
|
<B> Next:</B> <A NAME="tex2html926"
|
|
HREF="node45.html">4.7 Cyclomatic Complexity</A>
|
|
<B> Up:</B> <A NAME="tex2html920"
|
|
HREF="node38.html">4. SDCC Technical Data</A>
|
|
<B> Previous:</B> <A NAME="tex2html914"
|
|
HREF="node43.html">4.5 External Stack</A>
|
|
  <B> <A NAME="tex2html922"
|
|
HREF="node1.html">Contents</A></B>
|
|
  <B> <A NAME="tex2html924"
|
|
HREF="node61.html">Index</A></B>
|
|
<BR>
|
|
<BR>
|
|
<!--End of Navigation Panel-->
|
|
|
|
<H2><A NAME="SECTION00056000000000000000">
|
|
4.6 ANSI-Compliance</A>
|
|
</H2>
|
|
|
|
<P>
|
|
Deviations from the compliancy.
|
|
|
|
<P>
|
|
|
|
<UL>
|
|
<LI>functions are not always reentrant.</LI>
|
|
<LI>structures cannot be assigned values directly, cannot be passed as
|
|
function parameters or assigned to each other and cannot be a return
|
|
value from a function, e.g.:
|
|
<BR>
|
|
<BR>
|
|
<TT>struct s { ... }; </TT>
|
|
<BR>
|
|
<TT>struct s s1, s2; </TT>
|
|
<BR>
|
|
<TT>foo() </TT>
|
|
<BR>
|
|
<TT>{ </TT>
|
|
<BR>
|
|
<TT> ... </TT>
|
|
<BR>
|
|
<TT> s1 = s2 ; /* is invalid in SDCC although allowed
|
|
in ANSI */ </TT>
|
|
<BR>
|
|
<TT> ... </TT>
|
|
<BR>
|
|
<TT>}</TT>
|
|
<BR>
|
|
<TT>struct s foo1 (struct s parms) /* is invalid in SDCC although
|
|
allowed in ANSI */ </TT>
|
|
<BR>
|
|
<TT>{ </TT>
|
|
<BR>
|
|
<TT> struct s rets; </TT>
|
|
<BR>
|
|
<TT> ... </TT>
|
|
<BR>
|
|
<TT> return rets;/* is invalid in SDCC although allowed
|
|
in ANSI */ </TT>
|
|
<BR>
|
|
<TT>}</TT></LI>
|
|
<LI>'long long' (64 bit integers) not supported.</LI>
|
|
<LI>'double' precision floating point not supported.</LI>
|
|
<LI>No support for setjmp and longjmp (for now).</LI>
|
|
<LI>Old K&R style function declarations are NOT allowed.
|
|
<BR>
|
|
<BR>
|
|
<TT>foo(i,j) /* this old style of function declarations */
|
|
</TT>
|
|
<BR>
|
|
<TT>int i,j; /* are valid in ANSI but not valid in SDCC */
|
|
</TT>
|
|
<BR>
|
|
<TT>{ </TT>
|
|
<BR>
|
|
<TT> ... </TT>
|
|
<BR>
|
|
<TT>}</TT></LI>
|
|
<LI>functions declared as pointers must be dereferenced during the call.
|
|
<BR>
|
|
<BR>
|
|
<TT>int (*foo)();</TT>
|
|
<BR>
|
|
<TT>... </TT>
|
|
<BR>
|
|
<TT>/* has to be called like this */ </TT>
|
|
<BR>
|
|
<TT>(*foo)(); /* ansi standard allows calls to be made like
|
|
'foo()' */</TT></LI>
|
|
</UL>
|
|
|
|
<P>
|
|
<HR>
|
|
<!--Navigation Panel-->
|
|
<A NAME="tex2html925"
|
|
HREF="node45.html">
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
|
|
<A NAME="tex2html919"
|
|
HREF="node38.html">
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
|
|
<A NAME="tex2html913"
|
|
HREF="node43.html">
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
|
|
<A NAME="tex2html921"
|
|
HREF="node1.html">
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
|
|
<A NAME="tex2html923"
|
|
HREF="node61.html">
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A>
|
|
<BR>
|
|
<B> Next:</B> <A NAME="tex2html926"
|
|
HREF="node45.html">4.7 Cyclomatic Complexity</A>
|
|
<B> Up:</B> <A NAME="tex2html920"
|
|
HREF="node38.html">4. SDCC Technical Data</A>
|
|
<B> Previous:</B> <A NAME="tex2html914"
|
|
HREF="node43.html">4.5 External Stack</A>
|
|
  <B> <A NAME="tex2html922"
|
|
HREF="node1.html">Contents</A></B>
|
|
  <B> <A NAME="tex2html924"
|
|
HREF="node61.html">Index</A></B>
|
|
<!--End of Navigation Panel-->
|
|
<ADDRESS>
|
|
<I>Johan Knol</I>
|
|
<BR><I>2001-07-13</I>
|
|
</ADDRESS>
|
|
</BODY>
|
|
</HTML>
|