Boost logo

Boost Users :

From: Bruce Adams [TSP Sunbury] (bruadams_at_[hidden])
Date: 2003-03-18 05:25:30


Hi,
   I have just begun using boost with gcc-3.2 on a vanilla PC-cygwin
platform.
Up until deciding to use boost I have been compiling with warnings treated
as errors.
I am getting warning too many 'l' suffixes in integer constant. See output
below.
Does anyone know what is going on here?
The lines in the boost header file of interest use ULL as suffix.
I presume this is intended to mean unsigned long long though I could not
track down
the #define (ULL being a rather common string).
I have discovered that using ull in the preprocessor gives this warning
though it is
legal when declaring a constant in the language itself.
This looks like an inconsistency within gcc.
Perhaps because long long isn't officially in ISO C++ yet only C99 (correct
me if I'm wrong).
I managed to remove all but two occurances of the warning by taking the
dubious action of
changing ull to ul in boost in cstdint.h & limits.h
but I could not track down the remaining instances.
Are these suffixes necessary for these constants anyway?
If the constant is big enough to need to be a long long the compiler should
detect that
and do any promotions necessary before comparison, shouldn't it? If its
just for buggy compilers (assuming gcc isn't one of them in this case)
can't ULL be #defined away? Where can I find this definition?
Apologies for wasting bandwidth with this newbie error but can someone
recommend a preferred course of action.
                                Thanks & regards,
                                                     Bruce A.

(not actually using long longs in this particular application - yet)

gcc -c -x c++ -gstabs -fcheck-new -fstrict-aliasing -fstack-check -frtti
-Wall -
Wno-long-long -pedantic ReadWord.cpp -o ReadWord.o -I../General
-I../Boost/boost_1_29_0
In file included from ../Boost/boost_1_29_0/boost/regex/config.hpp:95,
                  from ../Boost/boost_1_29_0/boost/cregex.hpp:27,
                  from ../Boost/boost_1_29_0/boost/regex.h:26,
                  from ReadWord.cpp:18:
../Boost/boost_1_29_0/boost/cstdint.hpp:202:49: warning: too many 'l'
suffixes in integer constant
../Boost/boost_1_29_0/boost/cstdint.hpp:202:105: warning: too many 'l'
suffixes in integer constant
../Boost/boost_1_29_0/boost/cstdint.hpp:202:105: warning: too many 'l'
suffixes in integer constant
../Boost/boost_1_29_0/boost/cstdint.hpp:202:123: warning: too many 'l'
suffixes in integer constant
../Boost/boost_1_29_0/boost/cstdint.hpp:202:195: warning: too many 'l'
suffixes in integer constant

Note:
  warning: ISO C++ does not support `long long'
  warning: ISO C89 forbids long long integer constants
are suppressed by -Wno-long-long

============================================================================
 Any opinions expressed in this e-mail are those of the individual and not
 necessarily those of Tyco Safety Products.

 Any prices for the supply of goods or services are only valid if supported
 by a formal written quotation.

 This e-mail and any files transmitted with it, including replies and
 forwarded copies (which may contain alterations) subsequently transmitted
 from Tyco Saftey Products are confidential and solely for the use
 of the intended recipient.

 If you are not the intended recipient or the person responsible for
 delivery to the intended recipient, be advised that you have received this
 e-mail in error and that any use is strictly prohibited. In this event,
 please notify us via e-mail at 'helpdesk.tepg_at_[hidden]' or telephone on
 0121 255 6499 and then delete the e-mail and any copies of it.
============================================================================


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net