public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/114336] New: Manual should document implementation-defined behaviour in C++20 and C++23
@ 2024-03-14 12:04 redi at gcc dot gnu.org
2024-03-14 12:33 ` [Bug libstdc++/114336] " de34 at live dot cn
2024-03-14 13:25 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-14 12:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114336
Bug ID: 114336
Summary: Manual should document implementation-defined
behaviour in C++20 and C++23
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: documentation
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Blocks: 88322
Target Milestone: ---
Similar to
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#iso.2017.specific
and the equivalent for earlier standards, we need to document all
implementation-defined choices in the C++20 and C++23 features.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88322
[Bug 88322] Implement C++20 library features.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/114336] Manual should document implementation-defined behaviour in C++20 and C++23
2024-03-14 12:04 [Bug libstdc++/114336] New: Manual should document implementation-defined behaviour in C++20 and C++23 redi at gcc dot gnu.org
@ 2024-03-14 12:33 ` de34 at live dot cn
2024-03-14 13:25 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: de34 at live dot cn @ 2024-03-14 12:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114336
Jiang An <de34 at live dot cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |de34 at live dot cn
--- Comment #1 from Jiang An <de34 at live dot cn> ---
IMO the column number obtained from std::source_location::current is somehow
curious and might be critical. Implementations behaves differently, and
currently there doesn't seem any official documentation for this value.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/114336] Manual should document implementation-defined behaviour in C++20 and C++23
2024-03-14 12:04 [Bug libstdc++/114336] New: Manual should document implementation-defined behaviour in C++20 and C++23 redi at gcc dot gnu.org
2024-03-14 12:33 ` [Bug libstdc++/114336] " de34 at live dot cn
@ 2024-03-14 13:25 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-14 13:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114336
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't see how it can be critical, since it might just be 0 always, so it's
not a good idea to write code where that impl-defined value is critical.
For G++ the column number is the opening paren of
std::current_location::current() which doesn't seem curious to me.
We could subtract strlen("std::source_location::current") from that, but that
would give a weird value for weirdos doing weird things like:
auto loc = std::
source_location::
current
();
Since the line() value is always going to be the location of the () I think it
would be strange if the column was a different location.
But yes, this is one of the things that should be documented for conformance to
[defns.impl.defined].
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-14 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 12:04 [Bug libstdc++/114336] New: Manual should document implementation-defined behaviour in C++20 and C++23 redi at gcc dot gnu.org
2024-03-14 12:33 ` [Bug libstdc++/114336] " de34 at live dot cn
2024-03-14 13:25 ` 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).