public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/91759] [8/9/10 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608-ga56c0ac08242269b
[not found] <bug-91759-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-16 15:38 ` jakub at gcc dot gnu.org
2020-03-16 15:40 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-16 15:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91759
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The commit removed the "must be declared in the same scope as" diagnostics
altogether and expects set_decl_namespace not_found: to diagnose it instead.
But on this testcase, in_namespace is false in the caller and so
set_decl_namespace is never called from grokfndecl.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/91759] [8/9/10 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608-ga56c0ac08242269b
[not found] <bug-91759-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 15:38 ` [Bug c++/91759] [8/9/10 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608-ga56c0ac08242269b jakub at gcc dot gnu.org
@ 2020-03-16 15:40 ` jakub at gcc dot gnu.org
2020-03-18 7:54 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-16 15:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91759
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48045
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48045&action=edit
gcc10-pr91759.patch
So, shall we restore the old diagnostics for the case where set_decl_namespace
isn't called like this? Seems to work on check-c++-all
RUNTESTFLAGS=dg.exp=*deduct* so far.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/91759] [8/9/10 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608-ga56c0ac08242269b
[not found] <bug-91759-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 15:38 ` [Bug c++/91759] [8/9/10 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608-ga56c0ac08242269b jakub at gcc dot gnu.org
2020-03-16 15:40 ` jakub at gcc dot gnu.org
@ 2020-03-18 7:54 ` cvs-commit at gcc dot gnu.org
2020-03-18 7:55 ` [Bug c++/91759] [8/9 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608 jakub at gcc dot gnu.org
2021-05-04 11:48 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-18 7:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91759
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:af8656be8df68ac26840f7844430fd595255ebd2
commit r10-7236-gaf8656be8df68ac26840f7844430fd595255ebd2
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 18 08:53:23 2020 +0100
c++: Diagnose a deduction guide in a wrong scope [PR91759]
The following testcase is accepts-invalid since r7-6608-ga56c0ac08242269b.
Before that change we had this
"deduction guide %qD must be declared in the same scope as %qT"
diagnostics for it, after the change it is expected to be diagnosed
in set_decl_namespace at the not_found: label in there. On this testcase
nothing is diagnosed though, because set_decl_namespace isn't called at
all,
as in_namespace is NULL.
The following patch restores the old warning but does it only in case we
don't call set_decl_namespace.
2020-03-18 Jakub Jelinek <jakub@redhat.com>
PR c++/91759
* decl.c (grokfndecl): Restore old diagnostics about deduction
guide declared in different scope if in_namespace is NULL_TREE.
* g++.dg/cpp1z/class-deduction72.C: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/91759] [8/9 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608
[not found] <bug-91759-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-03-18 7:54 ` cvs-commit at gcc dot gnu.org
@ 2020-03-18 7:55 ` jakub at gcc dot gnu.org
2021-05-04 11:48 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-18 7:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91759
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10 Regression] g++ |[8/9 Regression] g++
|accepts ill-formed |accepts ill-formed
|deduction guides in wrong |deduction guides in wrong
|scope since |scope since r7-6608
|r7-6608-ga56c0ac08242269b |
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/91759] [8/9 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608
[not found] <bug-91759-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-03-18 7:55 ` [Bug c++/91759] [8/9 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608 jakub at gcc dot gnu.org
@ 2021-05-04 11:48 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-04 11:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91759
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|8.5 |10.0
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Not going to backport. Fixed for 10.1 and later.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-04 11:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-91759-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 15:38 ` [Bug c++/91759] [8/9/10 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608-ga56c0ac08242269b jakub at gcc dot gnu.org
2020-03-16 15:40 ` jakub at gcc dot gnu.org
2020-03-18 7:54 ` cvs-commit at gcc dot gnu.org
2020-03-18 7:55 ` [Bug c++/91759] [8/9 Regression] g++ accepts ill-formed deduction guides in wrong scope since r7-6608 jakub at gcc dot gnu.org
2021-05-04 11:48 ` 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).