public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111885] New: source code after "required from here" note sometimes printed strangely
@ 2023-10-19 20:59 ppalka at gcc dot gnu.org
  2023-10-19 23:59 ` [Bug c++/111885] [14 Regression] " ppalka at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-10-19 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111885
           Summary: source code after "required from here" note sometimes
                    printed strangely
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

$ cat required-from-here-bug.C
template<class T> void f(typename T::type);

int main() {
  f<int>(0);
}

$ g++ required-from-here-bug.C
required-from-here-bug.C: In function ‘int main()’:
required-from-here-bug.C:4:9: error: no matching function for call to
‘f<int>(int)’
    4 |   f<int>(0);
      |   ~~~~~~^~~
required-from-here-bug.C:1:24: note: candidate: ‘template<class T> void
f(typename T::type)’
    1 | template<class T> void f(typename T::type);
      |                        ^
required-from-here-bug.C:1:24: note:   template argument deduction/substitution
failed:
required-from-here-bug.C: In substitution of ‘template<class T> void f(typename
T::type) [with T = int]’:
required-from-here-bug.C:4:9:   required from here
required-from-here-bug.C:1:24: note:     4 |   f<int>(0);
required-from-here-bug.C:1:24: note:       |   ~~~~~~^~~
required-from-here-bug.C:1:24: error: ‘int’ is not a class, struct, or union
type
    1 | template<class T> void f(typename T::type);
      |                        ^

The two notes following the "required from here" diagnostic seem to be
misprinted -- they refer to line 1, but show source code from line 4, which
seems like a bug?

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

* [Bug c++/111885] [14 Regression] source code after "required from here" note sometimes printed strangely
  2023-10-19 20:59 [Bug c++/111885] New: source code after "required from here" note sometimes printed strangely ppalka at gcc dot gnu.org
@ 2023-10-19 23:59 ` ppalka at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-10-19 23:59 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |MOVED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
On second thought I reckon I'll just note this observation in the patch email
thread instead, sorry for the noise...

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

end of thread, other threads:[~2023-10-19 23:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 20:59 [Bug c++/111885] New: source code after "required from here" note sometimes printed strangely ppalka at gcc dot gnu.org
2023-10-19 23:59 ` [Bug c++/111885] [14 Regression] " ppalka 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).