[Chicken-users] minor build warning (twice) : runtime.c

2010-08-01 Thread John Gabriele
Hi,

Just built chicken on Ubuntu 10.04 (on x86_64) and saw this warning
come up twice:


gcc -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -I. -I./ \
  -c -Os -fomit-frame-pointer \
   \
  -DC_BUILDING_LIBCHICKEN runtime.c -o runtime-static.o
runtime.c: In function ‘C_number_to_string’:
runtime.c:7328: warning: ignoring return value of ‘gcvt’, declared
with attribute warn_unused_result


and


gcc -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -I. -I./ \
  -c -Os -fomit-frame-pointer -fPIC -DPIC \
  -DC_BUILDING_LIBCHICKEN runtime.c -o runtime.o
runtime.c: In function ‘C_number_to_string’:
runtime.c:7328: warning: ignoring return value of ‘gcvt’, declared
with attribute warn_unused_result


---John

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] minor build warning (twice) : runtime.c

2010-08-01 Thread Thomas Chust
2010/8/1 John Gabriele jmg3...@gmail.com:
 [...]
 Just built chicken on Ubuntu 10.04 (on x86_64) and saw this warning
 come up twice:
 [...]
 runtime.c: In function ‘C_number_to_string’:
 runtime.c:7328: warning: ignoring return value of ‘gcvt’, declared
 with attribute warn_unused_result
 [...]

Hello,

this warning is harmless. Actually, I would consider it a bug in the
system's C headers that gcvt is declared with attribute
warn_unused_result — the return value of this function is always the
same as the target buffer parameter passed to the function and hence
it is unlikely that any information is lost by ignoring it.

But then again, gcvt is a legacy function that was removed from
the most recent POSIX standards anyway and it is probably no wonder if
strange things happen when one uses it ;-)

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] current-time on 32-bit hardware

2010-08-01 Thread Nicolas Pelletier
Hi,

On Fri, Jul 30, 2010 at 9:13 PM, Felix
fe...@call-with-current-continuation.org wrote:
 I propose to use flonums for timeout values. This makes the
 representation of srfi-18 time values simpler and removes any
 possibility of overflow. I don't think the performance impact is all
 that heavy.

Okay, thank you. One thing that still bothers me is the use of
gettimeofday inside the scheduler. I'm not sure everything will work
nicely if an NTP server (or root) sets the date to something in the
past. And then comes the problem of having a _portable_ way to
represent monotonic time...

 If you are adventurous, you can try out the flonum-milliseconds
 branch in the git repository, where I made all the necessary changes
 (quite a lot, in fact). Feedback would be great, since I don't have
 decent testing code for multithreading.

Thank you, I'll try it.

 Something will break, that's for sure, but I see no way around it.

Well, it's an experimental branch, after all ;-)

-- 
Nicolas

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users