Article View: borland.public.cppbuilder.nativeapi
Article #4709Re: Code short circuit
From: Thomas Maeder [TeamB]
Date: Wed, 07 Dec 2005 08:26
Date: Wed, 07 Dec 2005 08:26
29 lines
2009 bytes
2009 bytes
" Bruce Salzman" <bruce@nospam.org> writes:
> The following constants are defined in winuser.h:
> #define SC_SIZE 0xF000
> #define SC_MOVE 0xF010
> #define SC_MINIMIZE 0xF020
> #define SC_MAXIMIZE 0xF030
> #define SC_CLOSE 0xF060
>
> When I compile this code, all the case statments are optimized away
> (cmd is a uint passed to a windows message handler):
>
> switch (cmd & 0xFFF0)
> {
> case SC_MAXIMIZE:
> case SC_RESTORE:
> case SC_MINIMIZE:
> case SC_MOVE:
> case SC_SIZE:
> return;
> default:
> break;
> }
What does "optimized away" mean?
Please post a complete, but minimal (<50 lines) program that
demonstrates what you are doing, along with a description of how you
expect the program to behave and how it effectively does.
Technical Details
Message-ID:
<m28xuxuxcx.fsf@glue.ch>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43961a6f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c4f5899a764a1e0
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Code short circuit
References: <43961a6f@newsgroups.borland.com>
From: maeder@glue.ch (Thomas Maeder [TeamB])
Organization: TeamB
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Date: Wed, 07 Dec 2005 09:26:06 +0100
Message-ID: <m28xuxuxcx.fsf@glue.ch>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)
Cancel-Lock: sha1:hvGJ8EsF+MR67sfG/cxpBNhA31w=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Host: 84.73.158.225
X-Trace: newsgroups.borland.com 1133943906 84.73.158.225 (7 Dec 2005 00:25:06 -0700)
Lines: 29
X-Authenticated-User: tmaeder
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail