public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/84075] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’
[not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-28 1:08 ` pinskia at gcc dot gnu.org
2023-03-30 17:59 ` [Bug c++/84075] [10/11/12/13 Regression] " ppalka at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-28 1:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to ensadc from comment #4)
> Further reduced:
>
> template < int > struct b { };
> template < typename n > struct g {
> typedef b< sizeof(n) > l;
> };
> template < typename h, typename = typename g< h >::l > class aa {};
> template < typename h, typename bz >
> void bj(aa< h, bz >, int);
> template < template < class > class ct > void bj(ct< class U >);
> void f() {
> bj(aa<int>(), 0);
> }
> ----
Hmm, it comes with -std=c++11 and -std=c++14 but not -std=c++17.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/84075] [10/11/12/13 Regression] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’
[not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
2021-08-28 1:08 ` [Bug c++/84075] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’ pinskia at gcc dot gnu.org
@ 2023-03-30 17:59 ` ppalka at gcc dot gnu.org
2023-07-07 10:33 ` [Bug c++/84075] [11/12/13/14 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-03-30 17:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.5
CC| |ppalka at gcc dot gnu.org
Summary|Template parameter not |[10/11/12/13 Regression]
|resolved: invalid |Template parameter not
|application of ‘sizeof’ to |resolved: invalid
|incomplete type |application of ‘sizeof’ to
|‘boost::serialization::U’ |incomplete type
| |‘boost::serialization::U’
--- Comment #12 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #11)
> (In reply to ensadc from comment #4)
> > Further reduced:
> >
> > template < int > struct b { };
> > template < typename n > struct g {
> > typedef b< sizeof(n) > l;
> > };
> > template < typename h, typename = typename g< h >::l > class aa {};
> > template < typename h, typename bz >
> > void bj(aa< h, bz >, int);
> > template < template < class > class ct > void bj(ct< class U >);
> > void f() {
> > bj(aa<int>(), 0);
> > }
> > ----
>
> Hmm, it comes with -std=c++11 and -std=c++14 but not -std=c++17.
Started to be rejected (with -std=c++17) since the introduction of
-fnew-ttp-matching r7-5537-g31bfc9b9dd65ec
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/84075] [11/12/13/14 Regression] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’
[not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
2021-08-28 1:08 ` [Bug c++/84075] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’ pinskia at gcc dot gnu.org
2023-03-30 17:59 ` [Bug c++/84075] [10/11/12/13 Regression] " ppalka at gcc dot gnu.org
@ 2023-07-07 10:33 ` rguenth at gcc dot gnu.org
2023-09-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-07-19 13:01 ` [Bug c++/84075] [12/13/14/15 " rguenth at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/84075] [11/12/13/14 Regression] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’
[not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2023-07-07 10:33 ` [Bug c++/84075] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2023-09-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-07-19 13:01 ` [Bug c++/84075] [12/13/14/15 " rguenth at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-18 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:155178ccb5f5bc89dcc8261ae1b64bc2fbfdbd45
commit r14-4109-g155178ccb5f5bc89dcc8261ae1b64bc2fbfdbd45
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Sep 18 14:41:05 2023 -0400
c++: always check arity before deduction
This simple patch extends the r12-3271-gf1e73199569287 optimization
to happen for deduction without explicit template arguments as well.
The motivation for this is to accept testcases such as conv20.C and
ttp40.C below, which don't use explicit template arguments but for
which unnecessary template instantiation during deduction could be
avoided if we uniformly pruned overloads according to arity early.
This incidentally causes us to accept one reduced testcase from
PR c++/84075, but the underlying issue there remains at large.
As a nice side effect, this change causes the "candidate expects N
argument(s)" note during overload resolution failure to point to the
template candidate instead of the call site, which seems like an
improvement along the lines of r14-309-g14e881eb030509.
gcc/cp/ChangeLog:
* call.cc (add_template_candidate_real): Check arity even
when there are no explicit template arguments. Combine the
two adjacent '!obj' tests into one.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/vt-57397-1.C: Expect "candidate expects ... N
argument(s)" at the declaration site instead of the call site.
* g++.dg/cpp0x/vt-57397-2.C: Likewise.
* g++.dg/overload/template5.C: Likewise.
* g++.dg/template/local6.C: Likewise.
* g++.dg/template/conv20.C: New test.
* g++.dg/template/ttp40.C: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/84075] [12/13/14/15 Regression] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’
[not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2023-09-18 18:41 ` cvs-commit at gcc dot gnu.org
@ 2024-07-19 13:01 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-07-19 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.5 |12.5
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11 branch is being closed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-19 13:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
2021-08-28 1:08 ` [Bug c++/84075] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’ pinskia at gcc dot gnu.org
2023-03-30 17:59 ` [Bug c++/84075] [10/11/12/13 Regression] " ppalka at gcc dot gnu.org
2023-07-07 10:33 ` [Bug c++/84075] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-09-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-07-19 13:01 ` [Bug c++/84075] [12/13/14/15 " rguenth 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).