public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bastiaan at bjacques dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/56977] gcc -Og incorrectly warns about 'constant zero length parameter'
Date: Sun, 07 Jul 2013 23:05:00 -0000 [thread overview]
Message-ID: <bug-56977-4-8zPNd8Ic1D@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56977-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56977
Bastiaan Jacques <bastiaan at bjacques dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bastiaan at bjacques dot org
--- Comment #7 from Bastiaan Jacques <bastiaan at bjacques dot org> ---
The following program fd.cc:
#include <sys/select.h>
int some_socket = 0;
void
foo()
{
fd_set fdset;
struct timeval tval;
FD_ZERO(&fdset);
FD_SET(some_socket, &fdset);
}
When compiled with:
g++ -c -o fd.o fd.cc -D_FORTIFY_SOURCE=2 -Og
Generates the following warning:
fd.cc:12:219: warning: call to ‘__fdelt_warn’ declared with attribute warning:
bit outside of fd_set selected [enabled by default]
FD_SET(some_socket, &fdset);
I think this might be another instance of this bug, because it goes away when
switching to -O2 (but I don't have a 4.8 branch handy to test whether the fix
also resolved this case).
>From gcc-bugs-return-425890-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jul 07 23:15:56 2013
Return-Path: <gcc-bugs-return-425890-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29944 invoked by alias); 7 Jul 2013 23:15:55 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29912 invoked by uid 48); 7 Jul 2013 23:15:52 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57842] for statement not terminating properly
Date: Sun, 07 Jul 2013 23:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.6.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57842-4-Atq0wIpbrQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57842-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57842-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-07/txt/msg00397.txt.bz2
Content-length: 255
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW842
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
http://www.codinghorror.com/blog/2008/03/the-first-rule-of-programming-its-always-your-fault.html
select isn't broken, neither is 'for'
next prev parent reply other threads:[~2013-07-07 23:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 11:09 [Bug c/56977] New: " baugesta at cisco dot com
2013-06-13 19:23 ` [Bug c/56977] " harald at gigawatt dot nl
2013-06-15 9:59 ` [Bug middle-end/56977] " harald at gigawatt dot nl
2013-06-16 21:15 ` pinskia at gcc dot gnu.org
2013-06-17 10:09 ` rguenth at gcc dot gnu.org
2013-06-25 8:22 ` rguenth at gcc dot gnu.org
2013-06-27 16:40 ` harald at gigawatt dot nl
2013-07-07 23:05 ` bastiaan at bjacques dot org [this message]
2013-08-28 8:30 ` rguenth at gcc dot gnu.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-56977-4-8zPNd8Ic1D@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).