public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-07  5:05 ` pinskia at gcc dot gnu.org
  2021-12-07  5:05 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  5:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.6.4
            Summary|rejects-valid on            |[9/10/11/12 Regression]
                   |global-namespace-qualified  |rejects-valid on
                   |variable declared after     |global-namespace-qualified
                   |class definition            |variable declared after
                   |                            |class definition
      Known to work|                            |4.1.2, 4.4.7, 4.5.3

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Full valid testcase (instead of 2 sources combined together):

struct A;
namespace N { extern A a; }
struct A {} ::N::a;

struct A1;
struct B { static A1 a1; };
struct A1 {} ::B::a1;

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
  2021-12-07  5:05 ` [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition pinskia at gcc dot gnu.org
@ 2021-12-07  5:05 ` pinskia at gcc dot gnu.org
  2021-12-08 17:24 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  5:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
  2021-12-07  5:05 ` [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition pinskia at gcc dot gnu.org
  2021-12-07  5:05 ` pinskia at gcc dot gnu.org
@ 2021-12-08 17:24 ` marxin at gcc dot gnu.org
  2022-01-17 15:11 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-08 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
All releases I have (4.8.0+) reject the code.

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-12-08 17:24 ` marxin at gcc dot gnu.org
@ 2022-01-17 15:11 ` rguenth at gcc dot gnu.org
  2022-04-27 19:18 ` mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |10.3.1
           Priority|P3                          |P2

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-01-17 15:11 ` rguenth at gcc dot gnu.org
@ 2022-04-27 19:18 ` mpolacek at gcc dot gnu.org
  2022-04-27 21:51 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-04-27 19:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Broken since r166977, this compiled fine before.

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-04-27 19:18 ` mpolacek at gcc dot gnu.org
@ 2022-04-27 21:51 ` mpolacek at gcc dot gnu.org
  2022-04-28 12:41 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-04-27 21:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-04-27 21:51 ` mpolacek at gcc dot gnu.org
@ 2022-04-28 12:41 ` cvs-commit at gcc dot gnu.org
  2022-04-28 12:42 ` cvs-commit at gcc dot gnu.org
  2022-04-28 12:48 ` [Bug c++/90107] [9/10 " mpolacek at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-28 12:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:851031b2fcd5210b96769c440db10130478d273c

commit r12-8304-g851031b2fcd5210b96769c440db10130478d273c
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Apr 27 18:17:54 2022 -0400

    c++: global-namespace-qualified var after class def [PR90107]

    Here we wrongly reject the definition of "::N::a"

      struct A;
      namespace N { extern A a; }
      struct A {} ::N::a;

    because our code to diagnose a missing ; after a class definition doesn't
    realize that :: can follow a class definition.

            PR c++/90107

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_class_specifier_1): Accept :: after a class
            definition.

    gcc/testsuite/ChangeLog:

            * g++.dg/parse/qualified6.C: New test.

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

* [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-04-28 12:41 ` cvs-commit at gcc dot gnu.org
@ 2022-04-28 12:42 ` cvs-commit at gcc dot gnu.org
  2022-04-28 12:48 ` [Bug c++/90107] [9/10 " mpolacek at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-28 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:940bf20cd337df5d044c59771a28d18bea595ec9

commit r11-9944-g940bf20cd337df5d044c59771a28d18bea595ec9
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Apr 27 18:17:54 2022 -0400

    c++: global-namespace-qualified var after class def [PR90107]

    Here we wrongly reject the definition of "::N::a"

      struct A;
      namespace N { extern A a; }
      struct A {} ::N::a;

    because our code to diagnose a missing ; after a class definition doesn't
    realize that :: can follow a class definition.

            PR c++/90107

    gcc/cp/ChangeLog:

            * parser.c (cp_parser_class_specifier_1): Accept :: after a class
            definition.

    gcc/testsuite/ChangeLog:

            * g++.dg/parse/qualified6.C: New test.

    (cherry picked from commit 851031b2fcd5210b96769c440db10130478d273c)

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

* [Bug c++/90107] [9/10 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
       [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-04-28 12:42 ` cvs-commit at gcc dot gnu.org
@ 2022-04-28 12:48 ` mpolacek at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-04-28 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
            Summary|[9/10/11/12 Regression]     |[9/10 Regression]
                   |rejects-valid on            |rejects-valid on
                   |global-namespace-qualified  |global-namespace-qualified
                   |variable declared after     |variable declared after
                   |class definition            |class definition
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed for 11.4 and GCC 12.

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

end of thread, other threads:[~2022-04-28 12:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-90107-4@http.gcc.gnu.org/bugzilla/>
2021-12-07  5:05 ` [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition pinskia at gcc dot gnu.org
2021-12-07  5:05 ` pinskia at gcc dot gnu.org
2021-12-08 17:24 ` marxin at gcc dot gnu.org
2022-01-17 15:11 ` rguenth at gcc dot gnu.org
2022-04-27 19:18 ` mpolacek at gcc dot gnu.org
2022-04-27 21:51 ` mpolacek at gcc dot gnu.org
2022-04-28 12:41 ` cvs-commit at gcc dot gnu.org
2022-04-28 12:42 ` cvs-commit at gcc dot gnu.org
2022-04-28 12:48 ` [Bug c++/90107] [9/10 " mpolacek 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).