public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102635] New: Wrong rejection of function default argument value depending on argument name
@ 2021-10-07  6:47 fchelnokov at gmail dot com
  2021-10-07  7:20 ` [Bug c++/102635] " pinskia at gcc dot gnu.org
  2024-04-04  6:56 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: fchelnokov at gmail dot com @ 2021-10-07  6:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102635
           Summary: Wrong rejection of function default argument value
                    depending on argument name
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This function definition is valid:
```
void f(int y = sizeof(y)) {}
```
per https://timsong-cpp.github.io/cppwp/n4861/dcl.fct.default#9

It is accepted in Clang, but wrongly rejected in GCC. Demo:
https://gcc.godbolt.org/z/WGWdxvMd5

See related discussion: https://stackoverflow.com/a/69461683/7325599

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

* [Bug c++/102635] Wrong rejection of function default argument value depending on argument name
  2021-10-07  6:47 [Bug c++/102635] New: Wrong rejection of function default argument value depending on argument name fchelnokov at gmail dot com
@ 2021-10-07  7:20 ` pinskia at gcc dot gnu.org
  2024-04-04  6:56 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-07  7:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=50479

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Very much related to PR 50479

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

* [Bug c++/102635] Wrong rejection of function default argument value depending on argument name
  2021-10-07  6:47 [Bug c++/102635] New: Wrong rejection of function default argument value depending on argument name fchelnokov at gmail dot com
  2021-10-07  7:20 ` [Bug c++/102635] " pinskia at gcc dot gnu.org
@ 2024-04-04  6:56 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-04  6:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Not just very closely, it is exactly the same.

*** This bug has been marked as a duplicate of bug 50479 ***

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

end of thread, other threads:[~2024-04-04  6:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07  6:47 [Bug c++/102635] New: Wrong rejection of function default argument value depending on argument name fchelnokov at gmail dot com
2021-10-07  7:20 ` [Bug c++/102635] " pinskia at gcc dot gnu.org
2024-04-04  6:56 ` 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).