[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Use noreturn attribute in clang versions w
From: |
Moritz Heidkamp |
Subject: |
Re: [Chicken-hackers] [PATCH] Use noreturn attribute in clang versions which support it |
Date: |
Wed, 23 Oct 2013 11:53:13 +0200 |
Hi,
Peter Bex <address@hidden> writes:
> Fixing this got rid of all the warnings, except one, which exposed
> a small bug which is also a minor inefficiency: C_2_divide will call
> C_fix() on an integer value, which in case of flonums will not be
> initialised. In cases of flonums, it will be initialised, but it will
> get C_fix()ed and immediately C_unfix()ed afterwards. This is
> unnecessary and wrong, so I've moved the C_fix() call to occur after
> the check.
I tried compiling the old master with clang and got lots of warnings
which disappeared after applying your patch. Very nice! Signed off and
pushed.
BTW, I got another warning when running the tests:
../chicken 'embedded4.scm' -output-file 'a.c' -scrutinize -verbose
-include-path ..
'clang' 'a.c' -o 'a.o' -c -fno-strict-aliasing -fwrapv
-DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -g -Wall -Wno-unused -DC_EMBEDDED
-I.. -I"/home/syn/code/public/chicken/core/target/include/chicken"
'clang' 'embedded3.c' -o 'embedded3.o' -c -fno-strict-aliasing -fwrapv
-DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -g -Wall -Wno-unused -DC_EMBEDDED
-I.. -I"/home/syn/code/public/chicken/core/target/include/chicken"
embedded3.c:23:26: warning: format specifies type 'unsigned int' but the
argument has type 'long' [-Wformat]
printf("data: %08x\n", val);
~~~~ ^~~
%08lx
Not sure if this is something to worry about, though.
> Perhaps this patch can also go into stability. It's not important,
> but probably a good idea so users compiling with clang won't get
> spurious warnings.
Jim?
> Sorry if this mail is a little rambling, I'm slightly ill right now.
Sorry to hear that, get well soon!
Moritz