public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/114808] New: Qualified void return type is not diagnosed
@ 2024-04-22 17:02 luigighiron at gmail dot com
  2024-04-22 19:11 ` [Bug c/114808] " jakub at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: luigighiron at gmail dot com @ 2024-04-22 17:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114808
           Summary: Qualified void return type is not diagnosed
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: luigighiron at gmail dot com
  Target Milestone: ---

The following code is accepted in GCC with no diagnostics being produced (even
when using -pedantic-errors):

const void f(void){}

This code violates the following constraint:

> The return type of a function shall be void or a complete object type other
> than array type.
Section 6.9.1 "Function definitions" Paragraph 3 ISO/IEC 9899:2018

const void is not void and it is not a complete object type.

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

end of thread, other threads:[~2024-04-23  5:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-22 17:02 [Bug c/114808] New: Qualified void return type is not diagnosed luigighiron at gmail dot com
2024-04-22 19:11 ` [Bug c/114808] " jakub at gcc dot gnu.org
2024-04-22 19:15 ` pinskia at gcc dot gnu.org
2024-04-22 19:17 ` jakub at gcc dot gnu.org
2024-04-22 19:34 ` pinskia at gcc dot gnu.org
2024-04-22 19:42 ` luigighiron at gmail dot com
2024-04-22 19:46 ` luigighiron at gmail dot com
2024-04-22 19:54 ` jsm28 at gcc dot gnu.org
2024-04-22 20:11 ` pinskia at gcc dot gnu.org
2024-04-23  1:12 ` luigighiron at gmail dot com
2024-04-23  5:54 ` xry111 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).