public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99672] New: std::source_location yield different column numbers between free function and template functions
@ 2021-03-19 15:25 hewillk at gmail dot com
  2021-03-19 16:36 ` [Bug c++/99672] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hewillk at gmail dot com @ 2021-03-19 15:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99672
           Summary: std::source_location yield different column numbers
                    between free function and template functions
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/8T3MGv

====

#include <iostream>
#include <source_location>

auto g(auto...) {
std::cout << std::source_location::current().column() << "\n";
}

auto f() {
std::cout << std::source_location::current().column() << "\n";
}

int main() {
g();
f();
std::cout << std::source_location::current().column() << "\n";
}

====

GCC-trunk output 43, 44, and 44, but the first one should be 44.

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

end of thread, other threads:[~2021-03-25 20:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 15:25 [Bug c++/99672] New: std::source_location yield different column numbers between free function and template functions hewillk at gmail dot com
2021-03-19 16:36 ` [Bug c++/99672] " jakub at gcc dot gnu.org
2021-03-19 16:55 ` jakub at gcc dot gnu.org
2021-03-21  9:18 ` hewillk at gmail dot com
2021-03-25 20:36 ` cvs-commit at gcc dot gnu.org
2021-03-25 20:38 ` jakub 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).