Mailinglist Archive: opensuse (1599 mails)

< Previous Next >
Re: [opensuse] Test Compiler - 64-bit or 32-bit
  • From: Andreas Jaeger <aj@xxxxxxxxxx>
  • Date: Fri, 23 Oct 2009 09:39:14 +0200
  • Message-id: <200910230939.17697.aj@xxxxxxxxxx>
On Thursday 22 October 2009 18:58:59 Peter Bloomfield wrote:
My question is correct. The problem is the 64-bit compiled version of
the executable results in severe image artefacts after reconstruction;
I know that this is not the case with the 32-bit compiled version. If I
forget this sometime in the future, then I want the program to stop
execution, flag an error, and I can then go back to my journal to check
why I did it this way.

why not do it at compile time?

If you only care about x86-64, do:

#if defined __x86_64__
# error "Compiling on 64-bit x86-64 not supported."

If you care about other 64-bit machines, do:
#include <sys/cdefs.h>
#if __WORDSIZE == 64
# error "..."

that way you'll never get a 64-bit object at all ;)

I would prefer to fix the image code instead to properly work with both 32-
bit and 64-bit wordsize,

Andreas Jaeger, Program Manager openSUSE, aj@{,}
Twitter: jaegerandi | Identica: jaegerandi
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
< Previous Next >
Follow Ups