public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96552] New: GCC accepts "alignas(auto)" in function parameter list
@ 2020-08-10 12:12 haoxintu at gmail dot com
  2021-07-27  4:59 ` [Bug c++/96552] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: haoxintu at gmail dot com @ 2020-08-10 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96552
           Summary: GCC accepts "alignas(auto)" in function parameter list
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi, all.

Following code is invalid I think, the "alignas" shouldn't be in function
parameter. I guess GCC only finds a "auto" in function parameter list rather
than "alignas(auto)", also "alignas(auto)" itself is invalid.

Code:
class Test{
    Test &operator || (alignas(auto) int);
};

While Clang says "error: 'auto' not allowed here".

Every version from GCC-6.1 upwards behaves the same.

Thanks,
Haoxin

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

* [Bug c++/96552] GCC accepts "alignas(auto)" in function parameter list
  2020-08-10 12:12 [Bug c++/96552] New: GCC accepts "alignas(auto)" in function parameter list haoxintu at gmail dot com
@ 2021-07-27  4:59 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-27  4:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-07-27
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

end of thread, other threads:[~2021-07-27  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 12:12 [Bug c++/96552] New: GCC accepts "alignas(auto)" in function parameter list haoxintu at gmail dot com
2021-07-27  4:59 ` [Bug c++/96552] " 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).