Bug 84812

Summary: sequence point warning not emitted
Product: [Retired] Red Hat Linux Reporter: Ben LaHaise <bcrl>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: mitr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-07 09:51:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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