[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Confuse-devel] CFG_SIMPLE_INT on 64bit machine
From: |
Martin Hömberg |
Subject: |
Re: [Confuse-devel] CFG_SIMPLE_INT on 64bit machine |
Date: |
Sun, 2 May 2010 17:24:30 +0200 |
User-agent: |
KMail/1.13.2 (Linux/2.6.32-21-generic; KDE/4.4.2; i686; ; ) |
On Friday 30 April 2010 11:14:08 Carlo Marcelo Arenas Belon wrote:
> On Thu, Apr 29, 2010 at 11:23:04AM +0200, Martin Hedenfalk wrote:
> > could you please test the patch by Carlo and verify that you indeed get a
> > compiler warning if you pass an int pointer to CFG_SIMPLE_INT?
Yes. Thank you for all the replies. I finally tried Carlo's patch with the
Intel compiler and it also produces now the corresponding warning:
bug.c(7): warning #144: a value of type "int *" cannot be used to initialize
an entity of type "long *"
CFG_SIMPLE_INT("b", &a[0]),
^
I think this warning is sufficient to see that something might go wrong at this
place.
>
> I did indeed use Martin's bug.c example for testing and shows the
> following warning when compiled :
>
> $ gcc -Wall -I. -lconfuse -o bug bug.c
> bug.c:7: warning: initialization from incompatible pointer type
>
> > We should probably still add the comment about int vs long int though.
>
> agree
>
> Carlo
- Re: [Confuse-devel] CFG_SIMPLE_INT on 64bit machine,
Martin Hömberg <=