<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/12/c10ab6a933e861837cc05d835f33990a"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-12-20T14:59:02"
  subject="Re: [Caml-list] Re: Marshalling tests fail on AMD x86_64 (Opteron). (PR#1979)"
  prev="2003/12/558c3ea8590ceaa0759c13dbe9214a62"
  next="2003/12/40b3de4cc54ef3b2aa6aed7de32917f8"
  prev-in-thread="2003/12/59c29f4d5f2da28e2310ec5d53a052cb"
  next-in-thread="2003/12/40b3de4cc54ef3b2aa6aed7de32917f8"
  prev-thread="2003/12/a48335fa2b3c2417a19068249002ab12"
  next-thread="2003/12/558c3ea8590ceaa0759c13dbe9214a62"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Re: Marshalling tests fail on AMD x86_64 (Opteron). (PR#1979)">
<msg 
  url="2003/12/59c29f4d5f2da28e2310ec5d53a052cb"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-12-20T11:30:08"
  subject="[Caml-list] Re: Marshalling tests fail on AMD x86_64 (Opteron). (PR#1979)">
<msg 
  url="2003/12/c10ab6a933e861837cc05d835f33990a"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-12-20T14:59:02"
  subject="Re: [Caml-list] Re: Marshalling tests fail on AMD x86_64 (Opteron). (PR#1979)">
</msg>
<msg 
  url="2003/12/40b3de4cc54ef3b2aa6aed7de32917f8"
  from="John Carr &lt;jfc@M...&gt;"
  author="John Carr"
  date="2003-12-20T16:45:25"
  subject="Re: [Caml-list] Re: Marshalling tests fail on AMD x86_64 (Opteron). (PR#1979)">
</msg>
<msg 
  url="2003/12/950b260ab356953ff0e1e925df4dc156"
  from="Aleksey Nogin &lt;nogin@c...&gt;"
  author="Aleksey Nogin"
  date="2003-12-22T08:42:22"
  subject="[Caml-list] Re: Marshalling tests fail on AMD x86_64 (Opteron). (PR#1979)">
</msg>
</msg>
</thread>

<contents>
On Sat, 2003-12-20 at 22:30, Xavier Leroy wrote:
&gt; &gt; I am having problems with the marshaller (I am getting a segfault in the 

&gt; The first test failure is either a bug in gcc or an unspecified
&gt; behavior of C that I wasn't aware of.  Basically, some stuff is
&gt; computed with type 'unsigned int', stored in an 'unsigned long'
&gt; variable, and compared against an 'unsigned int' constant.  The
&gt; gcc-generated code performs a sign extension 32 -&gt; 64 bits on the
&gt; unsigned int, causing the test to fail.  This behavior also occurs
&gt; with older versions of gcc on the Alpha.  Digital Unix's Alpha cc
&gt; compiler (the only other 64-bit C compiler I have at hand) doesn't do
&gt; sign extension.  A small example that reproduces the behavior is
&gt; attached.  I'll let the C language lawyers argue what the correct
&gt; behavior is.

Here is the rule for promotion of two values prior
to a binary operation, from ISO 'C99' Standard:

6.3.1.8 Usual arithmetic conversions
...
Otherwise, if both operands have signed integer types or 
both have unsigned integer types, the operand with 
the type of lesser integer conversion rank is
converted to the type of the operand with greater rank.



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

