public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/31887]  New: bad warning converting qualified void* to qualified array pointer
@ 2007-05-10  4:43 raeburn at raeburn dot org
  2007-05-10 23:00 ` [Bug c/31887] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: raeburn at raeburn dot org @ 2007-05-10  4:43 UTC (permalink / raw)
  To: gcc-bugs

/* With revision 124583, using compiler command "./xgcc -B./ -O -S ~/qual.c"
   in the "prev-gcc" directory once it's been updated with the current
   binaries, the compiler complains:

   qual.c:11: warning: passing argument 1 of 'foo' discards qualifiers from
pointer target type

*/
typedef unsigned char block[8];
extern int foo(const block *in, block *out);
int bar (const void *p, void *q) {
  return foo (p, q);            /* line 11 */
}

I'm not 100% sure about how array types and qualifiers mix, but I believe this
is correct code, and that there shouldn't be a warning.


-- 
           Summary: bad warning converting qualified void* to qualified
                    array pointer
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: raeburn at raeburn dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-31887-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-26  2:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-10  4:43 [Bug c/31887] New: bad warning converting qualified void* to qualified array pointer raeburn at raeburn dot org
2007-05-10 23:00 ` [Bug c/31887] " pinskia at gcc dot gnu dot org
2007-05-11  7:06 ` raeburn at raeburn dot org
2007-08-15  6:03 ` raeburn at raeburn dot org
2008-11-17 12:25 ` bugs at 59A2 dot org
     [not found] <bug-31887-4@http.gcc.gnu.org/bugzilla/>
2014-02-26  2:03 ` 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).