public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace
@ 2014-05-21 13:08 daniel at constexpr dot org
  2014-05-21 13:37 ` [Bug libstdc++/61269] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: daniel at constexpr dot org @ 2014-05-21 13:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

            Bug ID: 61269
           Summary: <type_traits> includes <cstdint> inside std namespace
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daniel at constexpr dot org

Partial diff from commit f2b58c906cf64f3e082bda9808b9f049bb71d5b4:

--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -41,6 +41,15 @@ namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION

+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+# if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__)
+  typedef __UINT_LEAST16_TYPE__ uint_least16_t;
+  typedef __UINT_LEAST32_TYPE__ uint_least32_t;
+# else
+#  include <cstdint>
+# endif
+#endif


Not reproducible with GCC as it defines __UINT_LEAST16_TYPE__ and
__UINT_LEAST32_TYPE__ (at least on Linux amd64), but breaks with other
compilers like Clang that end up on that #else branch.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
@ 2014-05-21 13:37 ` redi at gcc dot gnu.org
  2014-05-21 15:10 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-21 13:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-05-21
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oops, the whole point of that was to *not* break Clang!


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
  2014-05-21 13:37 ` [Bug libstdc++/61269] " redi at gcc dot gnu.org
@ 2014-05-21 15:10 ` redi at gcc dot gnu.org
  2014-05-21 15:19 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-21 15:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed May 21 15:09:37 2014
New Revision: 210715

URL: http://gcc.gnu.org/viewcvs?rev=210715&root=gcc&view=rev
Log:
    PR libstdc++/61269
    * include/std/type_traits: Move include outside namespace std.
    * testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
    * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
    * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
    Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/type_traits
    trunk/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
   
trunk/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
   
trunk/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
  2014-05-21 13:37 ` [Bug libstdc++/61269] " redi at gcc dot gnu.org
  2014-05-21 15:10 ` redi at gcc dot gnu.org
@ 2014-05-21 15:19 ` redi at gcc dot gnu.org
  2014-06-12 10:29 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-21 15:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.10.0

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
                   ` (2 preceding siblings ...)
  2014-05-21 15:19 ` redi at gcc dot gnu.org
@ 2014-06-12 10:29 ` redi at gcc dot gnu.org
  2014-06-12 14:49 ` daniel at constexpr dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-06-12 10:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Hi Daniel - did this fix solve the problem for Clang?

I'd like to backport the <type_traits> change that introduced the problem, but
only if I know it will be OK if I include this fix too.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
                   ` (3 preceding siblings ...)
  2014-06-12 10:29 ` redi at gcc dot gnu.org
@ 2014-06-12 14:49 ` daniel at constexpr dot org
  2014-06-12 16:13 ` redi at gcc dot gnu.org
  2014-06-13 12:00 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: daniel at constexpr dot org @ 2014-06-12 14:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

--- Comment #5 from Daniel Scharrer <daniel at constexpr dot org> ---
Yes, after your fix everything works with Clang.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
                   ` (4 preceding siblings ...)
  2014-06-12 14:49 ` daniel at constexpr dot org
@ 2014-06-12 16:13 ` redi at gcc dot gnu.org
  2014-06-13 12:00 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-06-12 16:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Great - thanks for confirming it


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libstdc++/61269] <type_traits> includes <cstdint> inside std namespace
  2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
                   ` (5 preceding siblings ...)
  2014-06-12 16:13 ` redi at gcc dot gnu.org
@ 2014-06-13 12:00 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-06-13 12:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61269

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Jun 13 11:59:22 2014
New Revision: 211636

URL: https://gcc.gnu.org/viewcvs?rev=211636&root=gcc&view=rev
Log:
2014-06-13  Jonathan Wakely  <jwakely@redhat.com>

    Backport from mainline
    PR libstdc++/60326
    * include/std/type_traits (__make_unsigned, __make_signed): Define
    specializations for wchar_t, char16_t and char32_t.
    * testsuite/20_util/make_signed/requirements/typedefs-4.cc: New.
    * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Correct
    test for make_unsigned<volatile wchar_t>.
    * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
    Likewise.
    * testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
    line number.
    * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
    Likewise.
    * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
    Likewise.

    Backport from mainline
    PR libstdc++/61269
    * include/std/type_traits: Move include outside namespace std.
    * testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
    * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
    * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
    Likewise.

Added:
   
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-4.cc
      - copied, changed from r211602,
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
Modified:
    branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_9-branch/libstdc++-v3/include/std/type_traits
   
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
   
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
   
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc
   
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
   
branches/gcc-4_9-branch/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-13 12:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-21 13:08 [Bug libstdc++/61269] New: <type_traits> includes <cstdint> inside std namespace daniel at constexpr dot org
2014-05-21 13:37 ` [Bug libstdc++/61269] " redi at gcc dot gnu.org
2014-05-21 15:10 ` redi at gcc dot gnu.org
2014-05-21 15:19 ` redi at gcc dot gnu.org
2014-06-12 10:29 ` redi at gcc dot gnu.org
2014-06-12 14:49 ` daniel at constexpr dot org
2014-06-12 16:13 ` redi at gcc dot gnu.org
2014-06-13 12:00 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).