[Bug libstdc++/58393] Please relax feature check for std::to_string and std::sto* for uClibc

2015-11-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.0

--- Comment #6 from Jonathan Wakely  ---
Should be fixed on trunk now.

[Bug libstdc++/58393] Please relax feature check for std::to_string and std::sto* for uClibc

2015-11-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Fri Nov 13 14:51:25 2015
New Revision: 230324

URL: https://gcc.gnu.org/viewcvs?rev=230324&root=gcc&view=rev
Log:
More fine-grained autoconf checks for C99 library

2015-11-13  Jennifer Yao  
Jonathan Wakely  

PR libstdc++/58393
PR libstdc++/61580
* acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with
-std=c++11 as well as -std=c++98, and define separate macros for each.
Cache the results of checking for complex math and wide character
functions. Reformat for readability.
* config.h.in: Regenerate.
* include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to
either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to
language standard in use.
* config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* config/locale/generic/c_locale.h (std::__convert_from_v): Likewise.
* config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise.
* config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO,
_GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR.
* configure: Regenerate.
* include/bits/basic_string.h: Make numeric conversion functions
depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or
_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
* include/ext/vstring.h: Likewise.
* include/bits/locale_facets.tcc (std::num_put::_M_insert_float):
Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* include/bits/locale_facets_nonio.tcc (std::money_put::do_put):
Likewise.
* include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_MATH.
* include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* src/c++98/locale_facets.cc (std::__num_base::_S_format_float):
Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* testsuite/18_support/exception_ptr/60612-terminate.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
(test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stof.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoi.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stol.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stold.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoll.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoul.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoull.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
to_wstring.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/13943.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise.
* testsuite/lib/libstdc++.exp (check_v3_target_string_conversions):
Change preprocessor #if conditional so that it uses
_GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
* testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH.
* testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* testsuite/tr1/8_c

[Bug libstdc++/58393] Please relax feature check for std::to_string and std::sto* for uClibc

2014-07-03 Thread nicolas.cavallari at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

nicolas.cavallari at lri dot fr changed:

   What|Removed |Added

  Attachment #30800|0   |1
is obsolete||

--- Comment #4 from nicolas.cavallari at lri dot fr ---
Created attachment 33060
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33060&action=edit
7 patches for being more specific with feature checks, in mbox format.

Following Paolo's comment, i made some other patches a while ago, using more
specific feature checks everywhere.  The only part where _GLIBCXX_USE_C99 is
still needed is when determining whether the time functions allows one or two
leap seconds.

However, my attemps to run the testsuite were always met with frustration and
undeterministic results, so i delayed it and kept working around the problem in
my programs.

I attach my untested patches here. Maybe i'll fight with the testsuite again,
maybe not.


[Bug libstdc++/58393] Please relax feature check for std::to_string and std::sto* for uClibc

2014-07-02 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-07-02
 CC||redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Jonathan Wakely  ---
No, but I do want to improve the use of those macros, and fix other issues like
PR 11196 at the same time.


[Bug libstdc++/58393] Please relax feature check for std::to_string and std::sto* for uClibc

2014-07-02 Thread thomas.petazz...@free-electrons.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

Thomas Petazzoni  changed:

   What|Removed |Added

 CC||thomas.petazzoni@free-elect
   ||rons.com

--- Comment #2 from Thomas Petazzoni  ---
I am one of the core developers of Buildroot, an embedded Linux build system,
which offers amongst other choices, the possibility of building a Linux system
based on the uClibc library. As such, we are facing the same problem as the one
reported by Nicolas Cavallari in this bug report: uClibc doesn't implement the
C99 complex maths functions, and this prevents libstdc++ from providing many
std-c++11 methods that are clearly unrelated to complex maths.

Has any progress been made towards applying Nicolas's patch?


[Bug libstdc++/58393] Please relax feature check for std::to_string and std::sto* for uClibc

2013-09-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

--- Comment #1 from Paolo Carlini  ---
In any case, please send patches to the mailing list, attached to bug report
will be easily overlooked. More specifically, if we are going to be more fine
grained about C99 support, other headers have to be consistently updated.