public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/112473] New: integer_sequence accepts non-integer types
@ 2023-11-10  5:08 hewillk at gmail dot com
  2023-11-10  5:13 ` [Bug libstdc++/112473] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hewillk at gmail dot com @ 2023-11-10  5:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112473
           Summary: integer_sequence accepts non-integer types
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

From [intseq.intseq]: Mandates: T is an integer type.

testcase:

#include <utility>

int main() {
  std::integer_sequence<std::pair<int, int>, std::pair{0, 0}> ic;
}

https://godbolt.org/z/j9h7Yr1YM

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
@ 2023-11-10  5:13 ` pinskia at gcc dot gnu.org
  2023-11-10 12:12 ` redi at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-10  5:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-11-10
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
  2023-11-10  5:13 ` [Bug libstdc++/112473] " pinskia at gcc dot gnu.org
@ 2023-11-10 12:12 ` redi at gcc dot gnu.org
  2023-11-10 12:19 ` redi at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-10 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ah it changed in C++20, previously it said "T shall be an integral type" so was
just UB.

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
  2023-11-10  5:13 ` [Bug libstdc++/112473] " pinskia at gcc dot gnu.org
  2023-11-10 12:12 ` redi at gcc dot gnu.org
@ 2023-11-10 12:19 ` redi at gcc dot gnu.org
  2023-11-11  0:44 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-10 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Although you couldn't use std::pair as a NTTP until C++20 anyway.

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
                   ` (2 preceding siblings ...)
  2023-11-10 12:19 ` redi at gcc dot gnu.org
@ 2023-11-11  0:44 ` cvs-commit at gcc dot gnu.org
  2023-11-11  1:02 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-11  0:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:0953497a81f1e320989b9f2aaa7f56747eddd4a0

commit r14-5347-g0953497a81f1e320989b9f2aaa7f56747eddd4a0
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Nov 10 12:21:52 2023 +0000

    libstdc++: Add static_assert to std::integer_sequence [PR112473]

    C++20 allows class types as non-type template parameters, but
    std::integer_sequence explicitly disallows them. Enforce that.

    libstdc++-v3/ChangeLog:

            PR libstdc++/112473
            * include/bits/utility.h (integer_sequence): Add static_assert.
            * testsuite/20_util/integer_sequence/112473.cc: New test.

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
                   ` (3 preceding siblings ...)
  2023-11-11  0:44 ` cvs-commit at gcc dot gnu.org
@ 2023-11-11  1:02 ` redi at gcc dot gnu.org
  2023-11-11  1:03 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-11  1:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
   Target Milestone|---                         |13.3

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
                   ` (4 preceding siblings ...)
  2023-11-11  1:02 ` redi at gcc dot gnu.org
@ 2023-11-11  1:03 ` redi at gcc dot gnu.org
  2023-12-06 14:44 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-11  1:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.3                        |12.4

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
                   ` (5 preceding siblings ...)
  2023-11-11  1:03 ` redi at gcc dot gnu.org
@ 2023-12-06 14:44 ` cvs-commit at gcc dot gnu.org
  2024-03-18 14:06 ` cvs-commit at gcc dot gnu.org
  2024-03-18 14:15 ` redi at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-06 14:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:f6ed5e0715da7040b04c465424bb33fcb95a5c20

commit r13-8131-gf6ed5e0715da7040b04c465424bb33fcb95a5c20
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Nov 10 12:21:52 2023 +0000

    libstdc++: Add static_assert to std::integer_sequence [PR112473]

    C++20 allows class types as non-type template parameters, but
    std::integer_sequence explicitly disallows them. Enforce that.

    libstdc++-v3/ChangeLog:

            PR libstdc++/112473
            * include/bits/utility.h (integer_sequence): Add static_assert.
            * testsuite/20_util/integer_sequence/112473.cc: New test.

    (cherry picked from commit 0953497a81f1e320989b9f2aaa7f56747eddd4a0)

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
                   ` (6 preceding siblings ...)
  2023-12-06 14:44 ` cvs-commit at gcc dot gnu.org
@ 2024-03-18 14:06 ` cvs-commit at gcc dot gnu.org
  2024-03-18 14:15 ` redi at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-18 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:dc0964f43dcee46dcd1843287a541668fd08a4a8

commit r12-10254-gdc0964f43dcee46dcd1843287a541668fd08a4a8
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Nov 10 12:21:52 2023 +0000

    libstdc++: Add static_assert to std::integer_sequence [PR112473]

    C++20 allows class types as non-type template parameters, but
    std::integer_sequence explicitly disallows them. Enforce that.

    libstdc++-v3/ChangeLog:

            PR libstdc++/112473
            * include/bits/utility.h (integer_sequence): Add static_assert.
            * testsuite/20_util/integer_sequence/112473.cc: New test.

    (cherry picked from commit 0953497a81f1e320989b9f2aaa7f56747eddd4a0)

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

* [Bug libstdc++/112473] integer_sequence accepts non-integer types
  2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
                   ` (7 preceding siblings ...)
  2024-03-18 14:06 ` cvs-commit at gcc dot gnu.org
@ 2024-03-18 14:15 ` redi at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-18 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 13.3 and 12.4

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

end of thread, other threads:[~2024-03-18 14:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10  5:08 [Bug libstdc++/112473] New: integer_sequence accepts non-integer types hewillk at gmail dot com
2023-11-10  5:13 ` [Bug libstdc++/112473] " pinskia at gcc dot gnu.org
2023-11-10 12:12 ` redi at gcc dot gnu.org
2023-11-10 12:19 ` redi at gcc dot gnu.org
2023-11-11  0:44 ` cvs-commit at gcc dot gnu.org
2023-11-11  1:02 ` redi at gcc dot gnu.org
2023-11-11  1:03 ` redi at gcc dot gnu.org
2023-12-06 14:44 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:06 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:15 ` 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).