public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35210]  New: gcc incorrectly allows calling function returning "const void"
@ 2008-02-15 16:11 eli dot friedman at gmail dot com
  2008-02-15 17:35 ` [Bug c/35210] " schwab at suse dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: eli dot friedman at gmail dot com @ 2008-02-15 16:11 UTC (permalink / raw)
  To: gcc-bugs

const void f(void); void g(void) {f();}

This testcase violates the constraint in C99 6.5.2.2p1 ("The expression that
denotes the called function shall have type pointer to function returning void
or returning an object type other than an array type.", so gcc at the very
least must produce a diagnostic when using -pedantic.  (BTW, is there any code
that depends on this working?)


-- 
           Summary: gcc incorrectly allows calling function returning "const
                    void"
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eli dot friedman at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35210


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

end of thread, other threads:[~2009-04-18 20:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 16:11 [Bug c/35210] New: gcc incorrectly allows calling function returning "const void" eli dot friedman at gmail dot com
2008-02-15 17:35 ` [Bug c/35210] " schwab at suse dot de
2008-02-15 18:01 ` eli dot friedman at gmail dot com
2009-04-18 14:25 ` jsm28 at gcc dot gnu dot org
2009-04-18 20:03 ` jsm28 at gcc dot gnu dot org
2009-04-18 20:04 ` jsm28 at gcc dot gnu dot 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).