public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/83469] union is not accepted as a valid class-key in template name resolution
       [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-09 22:47 ` pinskia at gcc dot gnu.org
  2021-12-07  5:35 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-09 22:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-09
           Keywords|                            |accepts-invalid,
                   |                            |rejects-valid
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
here is an example where we should reject it instead:
    struct S {
        union U { int m; };
    };
    template <typename T>
      void f()
      { struct T::U u; }
    int
    main()
    {
      f<S>();
    }

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

* [Bug c++/83469] union is not accepted as a valid class-key in template name resolution
       [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
  2021-08-09 22:47 ` [Bug c++/83469] union is not accepted as a valid class-key in template name resolution pinskia at gcc dot gnu.org
@ 2021-12-07  5:35 ` pinskia at gcc dot gnu.org
  2021-12-07  6:44 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  5:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> (gdb) p type
> $4 = <typename_type 0x7ffff0035348 U>
> (gdb) p class_key
> $5 = union_type
> 
> Should we allow such a combination?

Yes. The code change here will also fix PR 93809.
Let me try to see if I can fix it correctly.

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

* [Bug c++/83469] union is not accepted as a valid class-key in template name resolution
       [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
  2021-08-09 22:47 ` [Bug c++/83469] union is not accepted as a valid class-key in template name resolution pinskia at gcc dot gnu.org
  2021-12-07  5:35 ` pinskia at gcc dot gnu.org
@ 2021-12-07  6:44 ` pinskia at gcc dot gnu.org
  2021-12-07  9:33 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  6:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have a patch for this and PR 93809

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

* [Bug c++/83469] union is not accepted as a valid class-key in template name resolution
       [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-12-07  6:44 ` pinskia at gcc dot gnu.org
@ 2021-12-07  9:33 ` pinskia at gcc dot gnu.org
  2021-12-07  9:34 ` pinskia at gcc dot gnu.org
  2021-12-07 18:02 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 51938
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51938&action=edit
untested fix

This is the patch which fixes this one and PR 98417. I had originally was going
to do it was 2 seperate patches but we might introduce a regression so I
combined the two.

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

* [Bug c++/83469] union is not accepted as a valid class-key in template name resolution
       [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-12-07  9:33 ` pinskia at gcc dot gnu.org
@ 2021-12-07  9:34 ` pinskia at gcc dot gnu.org
  2021-12-07 18:02 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Created attachment 51938 [details]
> untested fix
> 
> This is the patch which fixes this one and PR 98417. I had originally was
> going to do it was 2 seperate patches but we might introduce a regression so
> I combined the two.

I put the wrong PR # here, it should have been PR 93809 (the patch is fine).

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

* [Bug c++/83469] union is not accepted as a valid class-key in template name resolution
       [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-12-07  9:34 ` pinskia at gcc dot gnu.org
@ 2021-12-07 18:02 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07 18:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2021-Decembe
                   |                            |r/586344.html

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586344.html

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

end of thread, other threads:[~2021-12-07 18:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-83469-4@http.gcc.gnu.org/bugzilla/>
2021-08-09 22:47 ` [Bug c++/83469] union is not accepted as a valid class-key in template name resolution pinskia at gcc dot gnu.org
2021-12-07  5:35 ` pinskia at gcc dot gnu.org
2021-12-07  6:44 ` pinskia at gcc dot gnu.org
2021-12-07  9:33 ` pinskia at gcc dot gnu.org
2021-12-07  9:34 ` pinskia at gcc dot gnu.org
2021-12-07 18:02 ` pinskia 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).