public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/53932] [10/11/12/13 Regression] C++ reference variable to member of anonymous union in global is error
Date: Thu, 19 Jan 2023 14:09:19 +0000	[thread overview]
Message-ID: <bug-53932-4-SN39UMlaEL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53932-4@http.gcc.gnu.org/bugzilla/>

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

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It isn't just references:
static union { int i; };
int &r = i;
int s = i;
int *t = &i;

void
foo (int **p, int *q)
{
  *p = &i;
  *q = i;
}

Inside of the function or global constructor for s it works ok.

  parent reply	other threads:[~2023-01-19 14:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12  2:55 [Bug c++/53932] New: [4.3 regression]C++ " nuller0222 at gmail dot com
2014-11-26 16:49 ` [Bug c++/53932] C++ " paolo.carlini at oracle dot com
2021-07-24 16:10 ` [Bug c++/53932] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-09-22  7:41 ` pinskia at gcc dot gnu.org
2021-09-22  7:42 ` pinskia at gcc dot gnu.org
2022-01-17 15:24 ` rguenth at gcc dot gnu.org
2022-01-21 13:56 ` rguenth at gcc dot gnu.org
2022-05-27  9:34 ` [Bug c++/53932] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-01-19 13:58 ` rguenth at gcc dot gnu.org
2023-01-19 14:00 ` rguenth at gcc dot gnu.org
2023-01-19 14:09 ` jakub at gcc dot gnu.org [this message]
2023-01-19 16:51 ` jakub at gcc dot gnu.org
2023-01-19 17:30 ` jakub at gcc dot gnu.org
2023-01-19 22:28 ` cvs-commit at gcc dot gnu.org
2023-01-19 22:33 ` [Bug c++/53932] [10/11/12 " jakub at gcc dot gnu.org
2023-02-10 17:45 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:55 ` [Bug c++/53932] [10/11 " jakub at gcc dot gnu.org
2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org
2023-05-03  9:24 ` jakub at gcc dot gnu.org
2023-05-03 15:20 ` [Bug c++/53932] [10 " cvs-commit at gcc dot gnu.org
2023-05-04  7:15 ` jakub 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-53932-4-SN39UMlaEL@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).