Bug 84812 - sequence point warning not emitted
Summary: sequence point warning not emitted
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-21 16:25 UTC by Ben LaHaise
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-07 09:51:03 UTC


Attachments (Terms of Use)

Description Ben LaHaise 2003-02-21 16:25:47 UTC
The program below should emit a warning when compiled with -Wall or
-Wsequence-point as a is read and modified.  Also, would it be possible to get
-Wsequence-point enabled by default in gcc?

int foo (int count)
{
        unsigned a = count;
        if ((a -= sizeof(count)) > a)
                return -1;
        return 0;
}

Comment 1 Jakub Jelinek 2004-10-07 09:51:03 UTC
Moved upstream:
http://gcc.gnu.org/PR17880


Note You need to log in before you can comment on or make changes to this bug.