www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/04/08:36:37

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-Id: <5.0.2.1.2.20020504135729.009e3690@pop.gmx.net>
X-Sender: martinSteuer AT gmx DOT de@pop.gmx.net
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Sat, 04 May 2002 14:04:32 +0200
To: djgpp AT delorie DOT com
From: Martin Steuer <martinSteuer AT gmx DOT de>
Subject: Can double negations get optimized out?
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

For example:

[...]
int a,b;
scanf("%d",&a);
b = !!a;
[...]

I want to be sure that b can only be 1 or 0. Do i have to worry that this 
is optimized out by a compiler? In my opinion i dont think so...

Thanks in advance for the info

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019