This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Proposal for the 'long long' problems


Phil Edwards <pedwards@disaster.jaj.com> writes:

| After much grepping, methinks that all of the uses of _GLIBCPP_USE_LONG_LONG
| guarding fall into three categories:
| 
|  1)  I/O
|      This includes the various put, get, do_* functions.  They depend on
|      C99 functions like strtoll and strtoull.

OK.

|  2)  Math
|      Specializations for numeric_limits, additional functions like div/lldiv
|      and abs/llabs, additional lldiv_t declaration if needed.

OK, with additional proper combinaison of pow() and co.

|  3)  <witty name goes here>
|      General support in the form of additional specializations for
|      _Is_integer, __is_integer, type_traits, and concept checking.  No
|      telling who/what are using these, so if 'long long' is on, these should
|      be present.

at least, the valarray component will use __is_integer<long long>.

| I propose:
| 
| a)  Because the default is now to enable them, the help text for
|     GLIBCPP_ENABLE_LONG_LONG should be changed to say that --disable-long-long
|     is that one that needs to be explicitly used, not --enable.  A 1-line diff.

OK.

| b)  Same for GLIBCPP_ENABLE_C99.

This needs more thoughts.

| c)  The ac_c99_* variables be more granular.  For example, if lldiv_t is not
|     available, we turn off ac_c99_stdlib, which may have been turned on by the
|     presence of strtoll & company.  Granted that the {presence,absence} of one
|     probably indicates that of the other, we can't tell from the result.

Wasn't the current behaviour driven an unacceptable configure time
performance reasons?

| d)  Instead of one preproc symbol, we define three:
|     _GLIBCPP_USE_LONG_LONG_IO     if strtoll, etc, are present; predicate
|                                   this on (the reworked) ac_c99_stdlib and
|                                   maybe ac_c99_wchar
|     _GLIBCPP_USE_LONG_LONG_MATH   if lldiv_t and such are present; predicate
|                                   on ac_c99_math (including lldiv_t)
|     _GLIBCPP_USE_LONG_LONG_ANY    if any 'long long' support is possible
|                                   anywhere at all

You might to sort out this with Neil.

| Finally,
| 
| e)  We replace the generic USE_LONG_LONG by the more specific guards:  case
|     (1) with _IO, (2) with _MATH, and (3) with _ANY.

OK.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]