public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lavr at ncbi dot nlm.nih.gov" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/60100] warning disappears when preprocessed source is compiled
Date: Thu, 06 Feb 2014 19:50:00 -0000 [thread overview]
Message-ID: <bug-60100-4-9ljEFFxySz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60100-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60100
--- Comment #3 from lavr at ncbi dot nlm.nih.gov ---
Ok, sorry and let me start again. My original mockup case wasn't good enough.
So attached is the real (preprocessed) code that fails to produce a warning
(yet when compiled from the .c form, the warning is there).
This completes w/o warnings:
> gcc -E -std=gnu11 -fgnu89-inline -c -Wall -Wno-format-y2k -fPIC -gdwarf-3 -D_DEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNCBI_WITHOUT_MT -I/home/lavr/cxx/GCC-Debug64/inc -I/home/lavr/cxx/include /home/lavr/cxx/src/connect/ncbi_socket.c -o ncbi_socket.i
> gcc -std=gnu11 -fgnu89-inline -c -Wall -Wno-format-y2k -fPIC -gdwarf-3 -D_DEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ncbi_socket.i -o ncbi_socket.o
This produces a warning (as it should):
gcc -c -std=gnu11 -fgnu89-inline -c -Wall -Wno-format-y2k -fPIC -gdwarf-3
-D_DEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-DNCBI_WITHOUT_MT -I/home/lavr/cxx/GCC-Debug64/inc -I/home/lavr/cxx/include
/home/lavr/cxx/src/connect/ncbi_socket.c -o ncbi_socket.o
/home/lavr/cxx/src/connect/ncbi_socket.c: In function 's_WritePending':
/home/lavr/cxx/src/connect/ncbi_socket.c:3447:33: warning: passing argument 3
of 'BUF_PeekAtCB' from incompatible pointer type [enabled by default]
x_WriteBuf, &ctx, sock->w_len);
^
In file included from /home/lavr/cxx/src/connect/ncbi_socketp.h:44:0,
from /home/lavr/cxx/src/connect/ncbi_connssl.h:37,
from /home/lavr/cxx/src/connect/ncbi_socket.c:76:
/home/lavr/cxx/include/connect/ncbi_buffer.h:180:36: note: expected 'size_t
(*)(void *, const void *, size_t)' but argument is of type 'size_t (*)(void *,
const void *, size_t, int)'
extern NCBI_XCONNECT_EXPORT size_t BUF_PeekAtCB
next prev parent reply other threads:[~2014-02-06 19:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 19:32 [Bug c/60100] New: " lavr at ncbi dot nlm.nih.gov
2014-02-06 19:34 ` [Bug c/60100] " pinskia at gcc dot gnu.org
2014-02-06 19:41 ` lavr at ncbi dot nlm.nih.gov
2014-02-06 19:50 ` lavr at ncbi dot nlm.nih.gov [this message]
2014-02-06 19:51 ` lavr at ncbi dot nlm.nih.gov
2014-03-24 10:47 ` mpolacek at gcc dot gnu.org
2014-03-24 13:44 ` schwab@linux-m68k.org
2014-03-24 15:56 ` lavr at ncbi dot nlm.nih.gov
2014-04-11 10:01 ` mpolacek at gcc dot gnu.org
2014-09-19 19:48 ` schwab@linux-m68k.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-60100-4-9ljEFFxySz@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).