public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101982] New: function parameter should not accept auto as placeholder-type-specifier
@ 2021-08-19 15:02 nickhuang99 at hotmail dot com
  2021-08-19 15:15 ` [Bug c++/101982] [7.5]function " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nickhuang99 at hotmail dot com @ 2021-08-19 15:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101982
           Summary: function parameter should not accept auto as
                    placeholder-type-specifier
           Product: gcc
           Version: 7.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nickhuang99 at hotmail dot com
  Target Milestone: ---

GCC7.5 accepts *auto* as placeholder-type-specifier without error or warning.
Considering following code snippet is legal only with -std=c++20:

   void f(auto i){} 

GCC8.x and later gives warning which is at least not incorrect. As a contrast,
both clang (https://www.godbolt.org/z/9x6E5xrne) and
MSVC(https://www.godbolt.org/z/3hWPsrcqz) considers it is illegal without
-std=c++20 option which is compliant with spec: 

   warning: use of ‘auto’ in parameter declaration only available with
‘-fconcepts-ts’

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

end of thread, other threads:[~2021-08-19 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 15:02 [Bug c++/101982] New: function parameter should not accept auto as placeholder-type-specifier nickhuang99 at hotmail dot com
2021-08-19 15:15 ` [Bug c++/101982] [7.5]function " redi at gcc dot gnu.org
2021-08-19 15:17 ` redi at gcc dot gnu.org
2021-08-19 19:51 ` nickhuang99 at hotmail dot com

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).