public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected
@ 2021-08-12  1:07 pinskia at gcc dot gnu.org
  2021-08-12  1:08 ` [Bug c++/101869] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12  1:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101869
           Summary: [9/10/11/12 Regression] &enumclass::enumvalue is
                    rejected
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
enum E { A };
E operator & (E e)
{
  return e;
}
E f(void)
{
    return &E::A;
}

------ CUT ----
This used to work in GCC 4.7.x and stopped working in GCC 4.8.x.  Puting
parentheses around E::A allows it work.

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

* [Bug c++/101869] [9/10/11/12 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
@ 2021-08-12  1:08 ` pinskia at gcc dot gnu.org
  2021-08-16  8:52 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12  1:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.8.1
      Known to work|                            |4.4.7, 4.6.4, 4.7.4
   Target Milestone|---                         |9.5

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The error message is:
<source>: In function 'E f()':
<source>:9:16: error: 'E' is not a class type
     return &E::A;
                ^

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

* [Bug c++/101869] [9/10/11/12 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
  2021-08-12  1:08 ` [Bug c++/101869] " pinskia at gcc dot gnu.org
@ 2021-08-16  8:52 ` rguenth at gcc dot gnu.org
  2022-03-30 21:50 ` mpolacek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-16  8:52 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/101869] [9/10/11/12 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
  2021-08-12  1:08 ` [Bug c++/101869] " pinskia at gcc dot gnu.org
  2021-08-16  8:52 ` rguenth at gcc dot gnu.org
@ 2022-03-30 21:50 ` mpolacek at gcc dot gnu.org
  2022-05-27  9:45 ` [Bug c++/101869] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-03-30 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-03-30
     Ever confirmed|0                           |1
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

Started working with r139611:

commit adf2edec3cd9b9002b7096744b627e4ea3b0d9d4
Author: Douglas Gregor <doug.gregor@gmail.com>
Date:   Tue Aug 26 22:33:10 2008 +0000

    c-common.c (do_switch_warnings): Look through the CONST_DECLs in the
enumerators of an ENUMERAL_TYPE.

    2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>

            * c-common.c (do_switch_warnings): Look through the CONST_DECLs in
            the enumerators of an ENUMERAL_TYPE.
            * dbxout.c (dbxout_type): Ditto.

and stopped with r190829:

commit e467c9d25782edea98d2cd66956d5abb82e847e9
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Aug 30 22:50:18 2012 -0400

    semantics.c (finish_qualified_id_expr): Handle building up a non-dependent
SCOPE_REF here.

            * semantics.c (finish_qualified_id_expr): Handle building up a
            non-dependent SCOPE_REF here.
            (finish_id_expression): Not here.
            * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.

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

* [Bug c++/101869] [10/11/12/13 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-03-30 21:50 ` mpolacek at gcc dot gnu.org
@ 2022-05-27  9:45 ` rguenth at gcc dot gnu.org
  2022-06-28 10:45 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug c++/101869] [10/11/12/13 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-05-27  9:45 ` [Bug c++/101869] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:45 ` jakub at gcc dot gnu.org
  2023-03-16 17:14 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug c++/101869] [10/11/12/13 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-06-28 10:45 ` jakub at gcc dot gnu.org
@ 2023-03-16 17:14 ` jason at gcc dot gnu.org
  2023-03-16 22:10 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-16 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
                 CC|                            |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

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

* [Bug c++/101869] [10/11/12/13 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-03-16 17:14 ` jason at gcc dot gnu.org
@ 2023-03-16 22:10 ` cvs-commit at gcc dot gnu.org
  2023-04-18 20:46 ` [Bug c++/101869] [10/11/12 " cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-16 22:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:1cc8814098bb46f9fca58a0b831fbf9a8574bdc9

commit r13-6721-g1cc8814098bb46f9fca58a0b831fbf9a8574bdc9
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Mar 16 13:11:32 2023 -0400

    c++: &enum::enumerator [PR101869]

    We don't want to call build_offset_ref with an enum.

            PR c++/101869

    gcc/cp/ChangeLog:

            * semantics.cc (finish_qualified_id_expr): Don't try to build a
            pointer-to-member if the scope is an enumeration.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/enum43.C: New test.

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

* [Bug c++/101869] [10/11/12 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-03-16 22:10 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 20:46 ` cvs-commit at gcc dot gnu.org
  2023-04-21 20:28 ` [Bug c++/101869] [10/11 " cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:2f9bb63c5e82512ba9e53f4d5e67949c100d8830

commit r12-9436-g2f9bb63c5e82512ba9e53f4d5e67949c100d8830
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Mar 16 13:11:32 2023 -0400

    c++: &enum::enumerator [PR101869]

    We don't want to call build_offset_ref with an enum.

            PR c++/101869

    gcc/cp/ChangeLog:

            * semantics.cc (finish_qualified_id_expr): Don't try to build a
            pointer-to-member if the scope is an enumeration.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/enum43.C: New test.

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

* [Bug c++/101869] [10/11 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-04-18 20:46 ` [Bug c++/101869] [10/11/12 " cvs-commit at gcc dot gnu.org
@ 2023-04-21 20:28 ` cvs-commit at gcc dot gnu.org
  2023-04-22  0:22 ` cvs-commit at gcc dot gnu.org
  2023-07-07 10:40 ` [Bug c++/101869] [11 " rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-21 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:6f7f90113bc78440a248bef4b917583fde3e6e5f

commit r10-11303-g6f7f90113bc78440a248bef4b917583fde3e6e5f
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Mar 16 13:11:32 2023 -0400

    c++: &enum::enumerator [PR101869]

    We don't want to call build_offset_ref with an enum.

            PR c++/101869

    gcc/cp/ChangeLog:

            * semantics.c (finish_qualified_id_expr): Don't try to build a
            pointer-to-member if the scope is an enumeration.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/enum43.C: New test.

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

* [Bug c++/101869] [10/11 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-04-21 20:28 ` [Bug c++/101869] [10/11 " cvs-commit at gcc dot gnu.org
@ 2023-04-22  0:22 ` cvs-commit at gcc dot gnu.org
  2023-07-07 10:40 ` [Bug c++/101869] [11 " rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-22  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:691e385b354482f3379bba471774873ca7179b79

commit r11-10643-g691e385b354482f3379bba471774873ca7179b79
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Mar 16 13:11:32 2023 -0400

    c++: &enum::enumerator [PR101869]

    We don't want to call build_offset_ref with an enum.

            PR c++/101869

    gcc/cp/ChangeLog:

            * semantics.c (finish_qualified_id_expr): Don't try to build a
            pointer-to-member if the scope is an enumeration.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/enum43.C: New test.

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

* [Bug c++/101869] [11 Regression] &enumclass::enumvalue is rejected
  2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-04-22  0:22 ` cvs-commit at gcc dot gnu.org
@ 2023-07-07 10:40 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

end of thread, other threads:[~2023-07-07 10:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  1:07 [Bug c++/101869] New: [9/10/11/12 Regression] &enumclass::enumvalue is rejected pinskia at gcc dot gnu.org
2021-08-12  1:08 ` [Bug c++/101869] " pinskia at gcc dot gnu.org
2021-08-16  8:52 ` rguenth at gcc dot gnu.org
2022-03-30 21:50 ` mpolacek at gcc dot gnu.org
2022-05-27  9:45 ` [Bug c++/101869] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-03-16 17:14 ` jason at gcc dot gnu.org
2023-03-16 22:10 ` cvs-commit at gcc dot gnu.org
2023-04-18 20:46 ` [Bug c++/101869] [10/11/12 " cvs-commit at gcc dot gnu.org
2023-04-21 20:28 ` [Bug c++/101869] [10/11 " cvs-commit at gcc dot gnu.org
2023-04-22  0:22 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:40 ` [Bug c++/101869] [11 " 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).