* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
@ 2021-05-25 9:03 ` redi at gcc dot gnu.org
2021-05-25 9:14 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-25 9:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |10.3.0
Target Milestone|--- |11.2
Known to fail| |11.1.0, 12.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
2021-05-25 9:03 ` [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object redi at gcc dot gnu.org
@ 2021-05-25 9:14 ` rguenth at gcc dot gnu.org
2021-05-26 19:24 ` jason at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-25 9:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
2021-05-25 9:03 ` [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object redi at gcc dot gnu.org
2021-05-25 9:14 ` rguenth at gcc dot gnu.org
@ 2021-05-26 19:24 ` jason at gcc dot gnu.org
2021-05-26 19:35 ` jason at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2021-05-26 19:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2021-05-26
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (2 preceding siblings ...)
2021-05-26 19:24 ` jason at gcc dot gnu.org
@ 2021-05-26 19:35 ` jason at gcc dot gnu.org
2021-05-26 19:35 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2021-05-26 19:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|jason at gcc dot gnu.org |unassigned at gcc dot gnu.org
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
This is happening because we aren't deferring the parse of this noexcept the
way we're supposed to. Marek?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (3 preceding siblings ...)
2021-05-26 19:35 ` jason at gcc dot gnu.org
@ 2021-05-26 19:35 ` jason at gcc dot gnu.org
2021-05-26 19:40 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2021-05-26 19:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (4 preceding siblings ...)
2021-05-26 19:35 ` jason at gcc dot gnu.org
@ 2021-05-26 19:40 ` mpolacek at gcc dot gnu.org
2021-06-08 21:10 ` mpolacek at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-05-26 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Mine then.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (5 preceding siblings ...)
2021-05-26 19:40 ` mpolacek at gcc dot gnu.org
@ 2021-06-08 21:10 ` mpolacek at gcc dot gnu.org
2021-06-08 21:12 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-06-08 21:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Duh, we don't defer parsing of noexcept for any ptr-operator, like
struct S {
int& f() noexcept(noexcept(i));
int i;
};
Awkward, but the fix should be simple.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (6 preceding siblings ...)
2021-06-08 21:10 ` mpolacek at gcc dot gnu.org
@ 2021-06-08 21:12 ` jason at gcc dot gnu.org
2021-06-26 0:12 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2021-06-08 21:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
As I mentioned on IRC, it seems like this may just be a matter of properly
passing down flags/member_p in the recursive call to cp_parser_declarator.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11/12 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (7 preceding siblings ...)
2021-06-08 21:12 ` jason at gcc dot gnu.org
@ 2021-06-26 0:12 ` cvs-commit at gcc dot gnu.org
2021-06-26 0:12 ` [Bug c++/100752] [11 " mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-26 0:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:f9c80eb12c58126a94ad869380af5b88b752c06f
commit r12-1822-gf9c80eb12c58126a94ad869380af5b88b752c06f
Author: Marek Polacek <polacek@redhat.com>
Date: Tue Jun 8 17:44:13 2021 -0400
c++: Failure to delay noexcept parsing with ptr-operator [PR100752]
We weren't passing 'flags' to the recursive call to cp_parser_declarator
in the ptr-operator case and as an effect, delayed parsing of noexcept
didn't work as advertised. The following change passes more than just
CP_PARSER_FLAGS_DELAY_NOEXCEPT but that doesn't seem to break anything.
I'm now also passing member_p and static_p, as a consequence, two tests
needed small tweaks.
PR c++/100752
gcc/cp/ChangeLog:
* parser.c (cp_parser_declarator): Pass flags down to
cp_parser_declarator. Also pass static_p/member_p.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/noexcept69.C: New test.
* g++.dg/parse/saved1.C: Adjust dg-error.
* g++.dg/template/crash50.C: Likewise.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (8 preceding siblings ...)
2021-06-26 0:12 ` cvs-commit at gcc dot gnu.org
@ 2021-06-26 0:12 ` mpolacek at gcc dot gnu.org
2021-06-29 13:18 ` cvs-commit at gcc dot gnu.org
2021-06-29 13:19 ` mpolacek at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-06-26 0:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12 Regression] error: |[11 Regression] error:
|cannot call member function |cannot call member function
|‘void S::f()’ without |‘void S::f()’ without
|object |object
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (9 preceding siblings ...)
2021-06-26 0:12 ` [Bug c++/100752] [11 " mpolacek at gcc dot gnu.org
@ 2021-06-29 13:18 ` cvs-commit at gcc dot gnu.org
2021-06-29 13:19 ` mpolacek at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-29 13:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:2cf8d3fc05737684a16fa080b0c0d24048da782b
commit r11-8662-g2cf8d3fc05737684a16fa080b0c0d24048da782b
Author: Marek Polacek <polacek@redhat.com>
Date: Tue Jun 8 17:44:13 2021 -0400
c++: Failure to delay noexcept parsing with ptr-operator [PR100752]
We weren't passing 'flags' to the recursive call to cp_parser_declarator
in the ptr-operator case and as an effect, delayed parsing of noexcept
didn't work as advertised. The following change passes more than just
CP_PARSER_FLAGS_DELAY_NOEXCEPT but that doesn't seem to break anything.
I'm now also passing member_p and static_p, as a consequence, two tests
needed small tweaks.
PR c++/100752
gcc/cp/ChangeLog:
* parser.c (cp_parser_declarator): Pass flags down to
cp_parser_declarator. Also pass static_p/member_p.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/noexcept69.C: New test.
* g++.dg/parse/saved1.C: Adjust dg-error.
* g++.dg/template/crash50.C: Likewise.
(cherry picked from commit f9c80eb12c58126a94ad869380af5b88b752c06f)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/100752] [11 Regression] error: cannot call member function ‘void S::f()’ without object
2021-05-25 9:01 [Bug c++/100752] New: [11/12 Regression] redi at gcc dot gnu.org
` (10 preceding siblings ...)
2021-06-29 13:18 ` cvs-commit at gcc dot gnu.org
@ 2021-06-29 13:19 ` mpolacek at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-06-29 13:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread