chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Use noreturn attribute in clang versions w


From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH] Use noreturn attribute in clang versions which support it
Date: Mon, 28 Oct 2013 23:07:45 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Thu, 24 Oct 2013 15:14:03 +0200 Peter Bex <address@hidden> wrote:

> On Wed, Oct 23, 2013 at 11:58:34AM +0200, Peter Bex wrote:
>> On Wed, Oct 23, 2013 at 11:53:13AM +0200, Moritz Heidkamp wrote:
>> > 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.
>> 
>> Ah, I guess we should take a look at it.  It's not a huge deal, but for
>> sanity we should use the correct format or cast it, or something.
>
> Here's a simple patch that works.  I've copied the definition for the
> format strings from runtime.c
>
> I briefly considered moving it to chicken.h, but then it'd have to get
> renamed everywhere to be prefixed C_ (as that's CHICKEN's "namespace"),
> and it's not used anywhere else AFAICT, so that's not worth it for now.

Thanks.  Pushed.

Best wishes.
Mario
-- 
http://parenteses.org/mario



reply via email to

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