public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106549] New: excessive error messages with nested undefined template
@ 2022-08-07 23:52 f.heckenbach@fh-soft.de
2022-08-08 0:05 ` [Bug c++/106549] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: f.heckenbach@fh-soft.de @ 2022-08-07 23:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106549
Bug ID: 106549
Summary: excessive error messages with nested undefined
template
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: f.heckenbach@fh-soft.de
Target Milestone: ---
% cat test.cpp
void f (X <X <X <X <X <X <X <int>>>>>>>);
% g++ --std=c++20 test.cpp |& head -n 30
test.cpp:1:27: error: 'X' was not declared in this scope
1 | void f (X <X <X <X <X <X <X <int>>>>>>>);
| ^
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:24: error: 'X' was not declared in this scope
1 | void f (X <X <X <X <X <X <X <int>>>>>>>);
| ^
test.cpp:1:27: error: 'X' was not declared in this scope
1 | void f (X <X <X <X <X <X <X <int>>>>>>>);
| ^
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
test.cpp:1:27: error: 'X' was not declared in this scope
% g++ --std=c++20 test.cpp |& wc
2921195 24780807 155318228
I don't have newer GCC versions installed locally, but according to a Godbolt
test, it seems to happen with them too (but since Godbolt truncates the
messages, I can't tell whether they produce quite the same amount).
The number of messages seems to grow exponentially with the number of template
nestings with a growth factor >11.
PS: Couldn't resist the opportunity to turn compiler output into an
animation/screensaver: ;)
g++ --std=c++20 test.cpp |& sed -un 's/ / /g;s/^ | //p' | tr -d '\n'
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/106549] excessive error messages with nested undefined template
2022-08-07 23:52 [Bug c++/106549] New: excessive error messages with nested undefined template f.heckenbach@fh-soft.de
@ 2022-08-08 0:05 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-08 0:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106549
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 97165.
*** This bug has been marked as a duplicate of bug 97165 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-08 0:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 23:52 [Bug c++/106549] New: excessive error messages with nested undefined template f.heckenbach@fh-soft.de
2022-08-08 0:05 ` [Bug c++/106549] " 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).