public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/99701] New: std::nullptr_t can be compared with relational ops @ 2021-03-21 20:38 cjdb.ns at gmail dot com 2021-03-21 23:34 ` [Bug c++/99701] " redi at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: cjdb.ns at gmail dot com @ 2021-03-21 20:38 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99701 Bug ID: 99701 Summary: std::nullptr_t can be compared with relational ops Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cjdb.ns at gmail dot com Target Milestone: --- Created attachment 50443 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50443&action=edit Temp file for provided source The following program is valid in all versions of GCC from 4.7.1 through trunk[1]. Relational operations on std::nullptr_t don't really make sense since there's only one value. ``` auto lt = nullptr < nullptr; auto gt = nullptr > nullptr; auto le = nullptr <= nullptr; auto ge = nullptr >= nullptr; ``` This was apparently addressed by DR583/N3478 (thanks to Richard Smith for providing these). [1]: https://godbolt.org/z/h11183 # Versions * All GCC releases at least as far back as 4.7.1 (where I stopped looking). # System type * Debian (checked GCC 10.2.1) * Compiler Explorer (checked all other reported versions). # Options given to GCC `g++ -save-temps nullptr-relop.cpp -c -std=c++20` ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99701] std::nullptr_t can be compared with relational ops 2021-03-21 20:38 [Bug c++/99701] New: std::nullptr_t can be compared with relational ops cjdb.ns at gmail dot com @ 2021-03-21 23:34 ` redi at gcc dot gnu.org 2021-03-22 13:15 ` mpolacek at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2021-03-21 23:34 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99701 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |accepts-invalid Last reconfirmed| |2021-03-21 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99701] std::nullptr_t can be compared with relational ops 2021-03-21 20:38 [Bug c++/99701] New: std::nullptr_t can be compared with relational ops cjdb.ns at gmail dot com 2021-03-21 23:34 ` [Bug c++/99701] " redi at gcc dot gnu.org @ 2021-03-22 13:15 ` mpolacek at gcc dot gnu.org 2021-07-27 15:40 ` mpolacek at gcc dot gnu.org 2024-01-20 17:17 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: mpolacek at gcc dot gnu.org @ 2021-03-22 13:15 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99701 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Mine (for GCC 12). ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99701] std::nullptr_t can be compared with relational ops 2021-03-21 20:38 [Bug c++/99701] New: std::nullptr_t can be compared with relational ops cjdb.ns at gmail dot com 2021-03-21 23:34 ` [Bug c++/99701] " redi at gcc dot gnu.org 2021-03-22 13:15 ` mpolacek at gcc dot gnu.org @ 2021-07-27 15:40 ` mpolacek at gcc dot gnu.org 2024-01-20 17:17 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: mpolacek at gcc dot gnu.org @ 2021-07-27 15:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99701 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Fixed in GCC 12. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99701] std::nullptr_t can be compared with relational ops 2021-03-21 20:38 [Bug c++/99701] New: std::nullptr_t can be compared with relational ops cjdb.ns at gmail dot com ` (2 preceding siblings ...) 2021-07-27 15:40 ` mpolacek at gcc dot gnu.org @ 2024-01-20 17:17 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-01-20 17:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99701 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |12.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-20 17:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-21 20:38 [Bug c++/99701] New: std::nullptr_t can be compared with relational ops cjdb.ns at gmail dot com 2021-03-21 23:34 ` [Bug c++/99701] " redi at gcc dot gnu.org 2021-03-22 13:15 ` mpolacek at gcc dot gnu.org 2021-07-27 15:40 ` mpolacek at gcc dot gnu.org 2024-01-20 17:17 ` pinskia 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).