Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Wed, 23 Jul 2008 20:38:28 -0400
Wilco Dijkstra wrote:
"CBFalconer" <cbfalconer@xxxxxxxxx> wrote:.... snip ...
One of the strengths of C is the fact that code that meets the
requirements of the standard is almost always totally portable. By
itself this is not the final word, but it makes it easy to isolate
and emphasize what code needs modification during a port.
No non-trivial piece of code meets all requirements of the standard.
Have you ever used lint or compiled some application with the strict
conformance checking option? You will be surprised. Even if it does
compile, it will still contain implementation defined behaviour which
makes it theorhetically unportable. In practise most non-conforming
code is portable, so there is no advantage at all in being conformant.
I routinely compile everything with virtually all error catching
enabled. If something appears that is not portable, I either
rewrite it to be portable (prefereable, unless there is a
significant performance penalty) or remove it to an isolated
<system-dependant> module. You will be surprised how portable your
code becomes, and how easy such writing becomes.
I eschew long functions, and I use the following alias (single
line) to execute gcc as cc:
gcc -W -Wall -ansi -pedantic -Wwrite-strings -Wfloat-equal -gstabs+
-ftrapv
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
.
- Follow-Ups:
- Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- From: Wilco Dijkstra
- Re: ARM/Linux: Is this a cross-compiler bugp? memcpy doesn't work as expected)
- From: Michael N. Moran
- Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- References:
- ARM/Linux: Is this a cross-compiler bug? (memcpy doesn't work as expected)
- From: Steven Woody
- Re: ARM/Linux: Is this a cross-compiler bug? (memcpy doesn't work as expected)
- From: Nils
- Re: ARM/Linux: Is this a cross-compiler bug? (memcpy doesn't work as expected)
- From: Frank Buss
- Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- From: Wilco Dijkstra
- Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- From: CBFalconer
- Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- From: Wilco Dijkstra
- ARM/Linux: Is this a cross-compiler bug? (memcpy doesn't work as expected)
- Prev by Date: Re: ARM/Linux: Is this a cross-compiler bug? (memcpy doesn't work as expected)
- Next by Date: Re: Finding power - gnd shorts
- Previous by thread: Re: ARM/Linux: Is this a cross-compiler bug? ¡]memcpy doesn't work as expected)
- Next by thread: Re: ARM/Linux: Is this a cross-compiler bugp? memcpy doesn't work as expected)
- Index(es):
Relevant Pages
|