public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107800] New: confusing message with to_address in C++17
@ 2022-11-22 1:27 hewillk at gmail dot com
2022-11-22 4:37 ` [Bug c++/107800] " pinskia at gcc dot gnu.org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: hewillk at gmail dot com @ 2022-11-22 1:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Bug ID: 107800
Summary: confusing message with to_address in C++17
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
When I try to use C++20 to_address in C++17 code, the compiler error message is
confusing:
<source>:2:1: note: 'std::to_address' is defined in header '<memory>'; did you
forget to '#include <memory>'?
1 | #include <memory>
+++ |+#include <memory>
2 |
This error message should be removed since I did include <memory>.
https://godbolt.org/z/T1PEnTdGY
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
@ 2022-11-22 4:37 ` pinskia at gcc dot gnu.org
2023-04-26 6:57 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-22 4:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-11-22
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |13.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Looks like a small typo in cxxapi-data.csv really:
apinski@xeond:~/src/upstream-gcc/gcc/gcc/cp$ git diff cxxapi-data.csv
diff --git a/gcc/cp/cxxapi-data.csv b/gcc/cp/cxxapi-data.csv
index 159daa28606..3875cab767e 100644
--- a/gcc/cp/cxxapi-data.csv
+++ b/gcc/cp/cxxapi-data.csv
@@ -460,7 +460,7 @@
# unimplemented <mdspan>,default_accessor,1,no
# unimplemented <mdspan>,mdspan,1,cxx23
<memory>,pointer_traits,1,cxx11
-<memory>,to_address,1,cxx11
+<memory>,to_address,1,cxx20
<memory>,align,1,cxx11
<memory>,assume_aligned,1,cxx20
<memory>,allocator_arg_t,1,cxx11
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
2022-11-22 4:37 ` [Bug c++/107800] " pinskia at gcc dot gnu.org
@ 2023-04-26 6:57 ` rguenth at gcc dot gnu.org
2023-07-27 9:24 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26 6:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.0 |13.2
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
2022-11-22 4:37 ` [Bug c++/107800] " pinskia at gcc dot gnu.org
2023-04-26 6:57 ` rguenth at gcc dot gnu.org
@ 2023-07-27 9:24 ` rguenth at gcc dot gnu.org
2023-09-07 10:35 ` amatuladeeba at gmail dot com
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.2 |13.3
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.2 is being released, retargeting bugs to GCC 13.3.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (2 preceding siblings ...)
2023-07-27 9:24 ` rguenth at gcc dot gnu.org
@ 2023-09-07 10:35 ` amatuladeeba at gmail dot com
2023-09-07 13:00 ` redi at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: amatuladeeba at gmail dot com @ 2023-09-07 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Amatul Adeeba <amatuladeeba at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amatuladeeba at gmail dot com
--- Comment #4 from Amatul Adeeba <amatuladeeba at gmail dot com> ---
Tried the above typo mentioned, still not working.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (3 preceding siblings ...)
2023-09-07 10:35 ` amatuladeeba at gmail dot com
@ 2023-09-07 13:00 ` redi at gcc dot gnu.org
2023-09-08 5:02 ` amatuladeeba at gmail dot com
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu.org @ 2023-09-07 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
What is not working?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (4 preceding siblings ...)
2023-09-07 13:00 ` redi at gcc dot gnu.org
@ 2023-09-08 5:02 ` amatuladeeba at gmail dot com
2024-05-21 9:13 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: amatuladeeba at gmail dot com @ 2023-09-08 5:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
--- Comment #6 from Amatul Adeeba <amatuladeeba at gmail dot com> ---
I mean even after trying the typo that is mentioned above, the error still
occurs.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (5 preceding siblings ...)
2023-09-08 5:02 ` amatuladeeba at gmail dot com
@ 2024-05-21 9:13 ` jakub at gcc dot gnu.org
2024-05-21 12:16 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-05-21 9:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.3 |13.4
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 13.3 is being released, retargeting bugs to GCC 13.4.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (6 preceding siblings ...)
2024-05-21 9:13 ` jakub at gcc dot gnu.org
@ 2024-05-21 12:16 ` redi at gcc dot gnu.org
2024-05-21 12:18 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu.org @ 2024-05-21 12:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Amatul Adeeba from comment #6)
> I mean even after trying the typo that is mentioned above, the error still
> occurs.
No it doesn't, it gives the correct error:
107800.cc: In function 'int main()':
107800.cc:5:8: error: 'to_address' is not a member of 'std'
5 | std::to_address(p);
| ^~~~~~~~~~
107800.cc:5:8: note: 'std::to_address' is only available from C++20 onwards
N.B. after fixing the typo you need to remove gcc/cp/std-name-hint.* in the GCC
source dir, so that those files are recreated from the csv file. If you don't
do that, you won't get the fix.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (7 preceding siblings ...)
2024-05-21 12:16 ` redi at gcc dot gnu.org
@ 2024-05-21 12:18 ` redi at gcc dot gnu.org
2024-05-21 20:59 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu.org @ 2024-05-21 12:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (8 preceding siblings ...)
2024-05-21 12:18 ` redi at gcc dot gnu.org
@ 2024-05-21 20:59 ` cvs-commit at gcc dot gnu.org
2024-05-21 21:53 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-21 20:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
--- Comment #9 from GCC 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:826a7d3d19d3ebf04e21d6f1c89eb341a36fb5d1
commit r15-760-g826a7d3d19d3ebf04e21d6f1c89eb341a36fb5d1
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue May 21 13:16:33 2024 +0100
c++: Fix std dialect hint for std::to_address [PR107800]
The correct dialect for std::to_address is cxx20 not cxx11.
gcc/cp/ChangeLog:
PR libstdc++/107800
* cxxapi-data.csv <to_address>: Change dialect to cxx20.
* std-name-hint.gperf: Regenerate.
* std-name-hint.h: Regenerate.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (9 preceding siblings ...)
2024-05-21 20:59 ` cvs-commit at gcc dot gnu.org
@ 2024-05-21 21:53 ` cvs-commit at gcc dot gnu.org
2024-05-21 22:03 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-21 21:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:5b96d547ce71b8f03ddbc2318c64618110839e20
commit r14-10227-g5b96d547ce71b8f03ddbc2318c64618110839e20
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue May 21 13:16:33 2024 +0100
c++: Fix std dialect hint for std::to_address [PR107800]
The correct dialect for std::to_address is cxx20 not cxx11.
gcc/cp/ChangeLog:
PR libstdc++/107800
* cxxapi-data.csv <to_address>: Change dialect to cxx20.
* std-name-hint.gperf: Regenerate.
* std-name-hint.h: Regenerate.
(cherry picked from commit 826a7d3d19d3ebf04e21d6f1c89eb341a36fb5d1)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (10 preceding siblings ...)
2024-05-21 21:53 ` cvs-commit at gcc dot gnu.org
@ 2024-05-21 22:03 ` cvs-commit at gcc dot gnu.org
2024-05-21 22:04 ` redi at gcc dot gnu.org
2024-05-22 20:00 ` pinskia at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-21 22:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
--- Comment #11 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:0a9df2c711f40e067cd57707d8e623136ae4efbe
commit r13-8787-g0a9df2c711f40e067cd57707d8e623136ae4efbe
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue May 21 13:16:33 2024 +0100
c++: Fix std dialect hint for std::to_address [PR107800]
The correct dialect for std::to_address is cxx20 not cxx11.
gcc/cp/ChangeLog:
PR libstdc++/107800
* cxxapi-data.csv <to_address>: Change dialect to cxx20.
* std-name-hint.gperf: Regenerate.
* std-name-hint.h: Regenerate.
(cherry picked from commit 826a7d3d19d3ebf04e21d6f1c89eb341a36fb5d1)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (11 preceding siblings ...)
2024-05-21 22:03 ` cvs-commit at gcc dot gnu.org
@ 2024-05-21 22:04 ` redi at gcc dot gnu.org
2024-05-22 20:00 ` pinskia at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu.org @ 2024-05-21 22:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 13.4 and 14.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/107800] confusing message with to_address in C++17
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
` (12 preceding siblings ...)
2024-05-21 22:04 ` redi at gcc dot gnu.org
@ 2024-05-22 20:00 ` pinskia at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-22 20:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107800
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |luigighiron at gmail dot com
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 115196 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-05-22 20:00 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 1:27 [Bug c++/107800] New: confusing message with to_address in C++17 hewillk at gmail dot com
2022-11-22 4:37 ` [Bug c++/107800] " pinskia at gcc dot gnu.org
2023-04-26 6:57 ` rguenth at gcc dot gnu.org
2023-07-27 9:24 ` rguenth at gcc dot gnu.org
2023-09-07 10:35 ` amatuladeeba at gmail dot com
2023-09-07 13:00 ` redi at gcc dot gnu.org
2023-09-08 5:02 ` amatuladeeba at gmail dot com
2024-05-21 9:13 ` jakub at gcc dot gnu.org
2024-05-21 12:16 ` redi at gcc dot gnu.org
2024-05-21 12:18 ` redi at gcc dot gnu.org
2024-05-21 20:59 ` cvs-commit at gcc dot gnu.org
2024-05-21 21:53 ` cvs-commit at gcc dot gnu.org
2024-05-21 22:03 ` cvs-commit at gcc dot gnu.org
2024-05-21 22:04 ` redi at gcc dot gnu.org
2024-05-22 20:00 ` 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).