Re: confusing shift warning

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

 



On 4/25/08, Pavel Roskin <proski@xxxxxxx> wrote:
> Quoting Marko Kreen <markokr@xxxxxxxxx>:
>
>
> > Platform: x64_64 linux, uint64_t -> unsigned long
> > Sparse: today's git (6dcc36a)
> >
>  ...
>
> > Guess - somewhere is hardwired that "long" == "32-bit"?
> >
>
>  Of course not.  But -m64 should be specified to enable 64-bit type sizes.
>
>
> > For reference:
> > $ cgcc -v -c test.c
> > sparse -v -c test.c -Dx86_64=1 -D__x86_64=1 -D__x86_64__=1
> >
>  ...
>
>  cgcc fails to add -m64.  It must be a bug in cgcc.  This would not produce
> the warning:
>
>  cgcc -m64 -no-compile Test.c

Ok, that somewhat explains it.  But:

    } elsif ($spec eq 'x86_64') {
        return (' -Dx86_64=1 -D__x86_64=1 -D__x86_64__=1' .
                &integer_types (8, 16, 32, $m32 ? 32 : 64, 64) .
                &float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
                &define_size_t ($m32 ? "unsigned int" : "long unsigned int"));

It seems that cgcc defaults to 64-bit on x86_64, but sparse to 32-bit.
Isn't it sparse bug then?  Shouldnt it follow platform defaults?

-- 
marko
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux