From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Scholz Date: Mon, 25 Apr 2005 12:30:15 +0200 Subject: [U-Boot-Users] Compiler question: integer division? In-Reply-To: <20050425093506.CF639C1510@atlas.denx.de> References: <20050425093506.CF639C1510@atlas.denx.de> Message-ID: <426CC6B7.30309@imc-berlin.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > In message <426CA9EF.6080003@imc-berlin.de> you wrote: > >>How about >> a = b / 5; >> ? >>Will that result in >> a = (b >> 2) - b; > > > We don't know which architecture you're using, and which version of > which compiler, so how can we know this? I have hoped there will be a general answer, like "gcc always/never does this ..." no matter wich architecture... Thanks a million for all your comments. Steven