public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/90107] [9/10/11/12 Regression] rejects-valid on global-namespace-qualified variable declared after class definition
Date: Thu, 28 Apr 2022 12:42:52 +0000	[thread overview]
Message-ID: <bug-90107-4-ygEzQumSiz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-90107-4@http.gcc.gnu.org/bugzilla/>

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)

  parent reply	other threads:[~2022-04-28 12:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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
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 [this message]
2022-04-28 12:48 ` [Bug c++/90107] [9/10 " mpolacek at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-90107-4-ygEzQumSiz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).