pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: pspp rc4 on Mac: pfm-write errors


From: Marshall DeBerry
Subject: RE: pspp rc4 on Mac: pfm-write errors
Date: Tue, 26 Jul 2005 21:42:24 -0400

Rerunning the code snippet with the semicolon corrected produces the same
set of warning messages;  running the program with (long double) 30 produces
a  pretty standard warning regarding printf ("incompatible implicit
declaration of built-in function 'printf'") and no other warnings.  

Explicit casting to allocate sufficient space is needed, perhaps?

Marshall


-----Original Message-----
From: John Darrington [mailto:address@hidden 
Sent: Tuesday, July 26, 2005 8:54 PM
To: Marshall DeBerry
Cc: 'John Darrington'; address@hidden; address@hidden
Subject: Re: pspp rc4 on Mac: pfm-write errors

Tue, Jul 26, 2005 at 08:37:30PM -0400, Marshall DeBerry wrote:
     John Darrington wrote:
     
     I get a number of "integer overflow in expression" warnings, and then a
     "parse error before ';' token".


Sorry.  The semicolon should have been outside the braces, like this:
     
#include <stdio.h>

int
main(int argc, char **argv)
{
       static const double foo[1] =
       {
         30 *  30 *  30 *  30 *  30 *  30 *  30 *
         30 *  30 *  30 *  30 *  30 *  30 *  30 *
         30 *  30 *  30 *  30 *  30 *  30 *  30 
       };
       printf("%g\n",foo[0]);
}

     I'm going to file a bug report on the GCC compiler with Apple, and use
the
     pfm_write.c module as the example.


The Apple people are much more likely to act on a bug report if you can give

them a very concise test case.  If the above works, then try replacing
30 with (long double) 30 and see what happens.

J'
     

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]