sane-project-website/old-archive/2000-02/0267.html

238 wiersze
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: New CVS snapshot 20000213</TITLE>
<META NAME="Author" CONTENT="Harry E. Clarke (hec@heclarke.freeserve.co.uk)">
<META NAME="Subject" CONTENT="Re: New CVS snapshot 20000213">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: New CVS snapshot 20000213</H1>
<!-- received="Mon Feb 21 13:00:13 2000" -->
<!-- isoreceived="20000221210013" -->
<!-- sent="Mon, 21 Feb 2000 21:02:05 +0000" -->
<!-- isosent="20000221210205" -->
<!-- name="Harry E. Clarke" -->
<!-- email="hec@heclarke.freeserve.co.uk" -->
<!-- subject="Re: New CVS snapshot 20000213" -->
<!-- id="20000221210206.195C2AD1AF@heclarke.freeserve.co.uk" -->
<!-- inreplyto="CA25688B.0082FBB8.00@d73mta01.au.ibm.com" -->
<STRONG>From:</STRONG> Harry E. Clarke (<A HREF="mailto:hec@heclarke.freeserve.co.uk?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;"><EM>hec@heclarke.freeserve.co.uk</EM></A>)<BR>
<STRONG>Date:</STRONG> Mon Feb 21 2000 - 13:02:05 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0268.html">Randolph Bentson: "Preview functionality"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0266.html">Matto Marjanovic: "Re: support for AGFA ARCUS II"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0254.html">msitkows@au1.ibm.com: "Re: New CVS snapshot 20000213"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#267">[ date ]</A>
<A HREF="index.html#267">[ thread ]</A>
<A HREF="subject.html#267">[ subject ]</A>
<A HREF="author.html#267">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
I guess I must of have been realy unlucky then for my K&amp;R code to behave
<BR>
differently on two different systems. Its too many years ago to remember
<BR>
the reason, but it was something along the lines of the way different
<BR>
compilers made asumptions.
<BR>
<P>Of course in K&amp;R code you ignore parameter checking all together.
<BR>
Just one less set of warnings to have to worry about.
<BR>
<P>Have fun
<BR>
Harry
<BR>
<P>In message &lt;<A HREF="mailto:CA25688B.0082FBB8.00@d73mta01.au.ibm.com?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">CA25688B.0082FBB8.00@d73mta01.au.ibm.com</A>&gt;, <A HREF="mailto:msitkows@au1.ibm.com?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">msitkows@au1.ibm.com</A> wri
<BR>
tes:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;I beg to differ on this one since, in my experience, the one thing ANSI C
</EM><BR>
<EM>&gt;is not, is 'portable'.
</EM><BR>
<EM>&gt;After 15 years of writing C on almost every platform known to man (and some
</EM><BR>
<EM>&gt;which aren't...) I can almost guarantee that code which strictly adheres to
</EM><BR>
<EM>&gt;K&amp;R rules will compile cleanly on any platform (given a few system call
</EM><BR>
<EM>&gt;differences, like vfork() etc).
</EM><BR>
<EM>&gt;However, I have yet to find two ANSI C compilers which agree on all points
</EM><BR>
<EM>&gt;of the so-called standard. You'll find they cautiously refer to 'levels of
</EM><BR>
<EM>&gt;compliance'.
</EM><BR>
<EM>&gt;I remember 'translating' to ANSI some quite ordinary X11/Motif K&amp;R code
</EM><BR>
<EM>&gt;which ran very nicely on AIX, SGI and Sun. It finished up being peppered
</EM><BR>
<EM>&gt;with hundreds of '#ifdef AIX' '#ifdef SGI' statements, and inherited some
</EM><BR>
<EM>&gt;interesting bugs.
</EM><BR>
<EM>&gt;If you only support one compiler, like gcc, then you might be able to port
</EM><BR>
<EM>&gt;the same code to most platforms. However, first read the platform specific
</EM><BR>
<EM>&gt;notes that come with gcc - it doesn't *quite* work the same on every
</EM><BR>
<EM>&gt;box....
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Best regards,
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Mark
</EM><BR>
<EM>&gt;------------------------------------------------------------------------
</EM><BR>
<EM>&gt; Mark Sitkowski
</EM><BR>
<EM>&gt; Design Simulation Systems Ltd
</EM><BR>
<EM>&gt; 14 Loddon Street
</EM><BR>
<EM>&gt; Box Hill North, Victoria 3129
</EM><BR>
<EM>&gt;------------------------------------------------------------------------
</EM><BR>
<EM>&gt; phone: (613-9) 897-1375 fax: (613-9) 897-1376
</EM><BR>
<EM>&gt; Mobile: 0413-890-777 E-mail: <A HREF="mailto:marks@iaccess.com.au?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">marks@iaccess.com.au</A>
</EM><BR>
<EM>&gt; Web: www.angelfire.com/de/designsim
</EM><BR>
<EM>&gt; www.asiafind.com/sites/designsim
</EM><BR>
<EM>&gt;------------------------------------------------------------------------
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;There has been discussion recently about adding/removing compiler warnings.
</EM><BR>
<EM>&gt;If you want to write good clean code that is portable, then use ANSI C
</EM><BR>
<EM>&gt;compiler (not allowing tradtional C), and remove all warnings. The
</EM><BR>
<EM>&gt;following
</EM><BR>
<EM>&gt;flags should be used.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; -ansi -pedantic -Wall
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Adding the flag &quot;-Wpointer-arith&quot;, is probably a good idea, or at least
</EM><BR>
<EM>&gt;a very good reason why the warnings are OK.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;As the ansi and pedantic flags are not currently used, they should be
</EM><BR>
<EM>&gt;introduced for the next release, after the release on Sunday.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Harry
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;In message &lt;<A HREF="mailto:38AE7D8F.9A0334B8@dial.pipex.com?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">38AE7D8F.9A0334B8@dial.pipex.com</A>&gt;, John Vickers writes:
</EM><BR>
<EM>&gt;&lt;snip&gt;
</EM><BR>
<EM>&gt;&gt;&gt; Therefore I suggest to remove the flag -Wpointer-arith from the final
</EM><BR>
<EM>&gt;&gt;&gt; release.
</EM><BR>
<EM>&gt;&gt;
</EM><BR>
<EM>&gt;&gt;Or maybe remove all the warning flags, even. I get huge numbers of
</EM><BR>
<EM>&gt;&gt;warnings
</EM><BR>
<EM>&gt;&gt;building Sane with &quot;-W -Wall&quot;. But for development releases,
</EM><BR>
<EM>&gt;&gt;we should really be trying to get rid of the causes of the warnings.
</EM><BR>
<EM>&gt;&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;--
</EM><BR>
<EM>&gt;Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
</EM><BR>
<EM>&gt;To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">majordomo@mostang.com</A>
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;--
</EM><BR>
<EM>&gt;Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
</EM><BR>
<EM>&gt;To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">majordomo@mostang.com</A>
</EM><BR>
<EM>&gt;
</EM><BR>
<P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20New%20CVS%20snapshot%2020000213&In-Reply-To=&lt;20000221210206.195C2AD1AF@heclarke.freeserve.co.uk&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0268.html">Randolph Bentson: "Preview functionality"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0266.html">Matto Marjanovic: "Re: support for AGFA ARCUS II"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0254.html">msitkows@au1.ibm.com: "Re: New CVS snapshot 20000213"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#267">[ date ]</A>
<A HREF="index.html#267">[ thread ]</A>
<A HREF="subject.html#267">[ subject ]</A>
<A HREF="author.html#267">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Mon Feb 21 2000 - 13:00:56 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>