On terça-feira, 15 de maio de 2012 10.04.37, Carl Schumann wrote:
> > tst_qtendian.cpp:75: error: integer constant is too large for 'long' type
>
> The content of
> /scratch/schumann/gerrit3/qtbase/tests/auto/corelib/global/qtendian/tst_qten
> dian.cpp:75
> is:
> > static const TestData inNativeEndian = { 0x0123456789abcdef,
> > 0x00c0ffee, 0xcafe, 0xcf, '\0' };
>
> TestData's first member is a quint64.  Based on
>
> > /scratch/schumann/gerrit3/qtbase/src/corelib/global/qglobal.h:203:typedef
> > unsigned long long quint64; /* 64 bit unsigned */
>
> and quint64's name I would expect it to be a 64-bit integer.
> Apparently, it is merely a long some how in my environment.

qint64 cannot be a long. Since it can't, I don't think that's what the
compiler is complaining about.

What GCC version is that?

> Any ideas please?  Thanks as always for any help.

Try writing Q_UINT64_C(0x0123456789abcdef) there. See if that helps.

It is incorrect to write any constant larger than INT_MAX without the
suffixes...

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to