This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: why use #ifdef __GNUC__ in sim/ppc/words.h??
- From: Daniel Jacobowitz <drow at false dot org>
- To: Manoj Iyer <manjo at austin dot ibm dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 18 Apr 2005 12:26:23 -0400
- Subject: Re: why use #ifdef __GNUC__ in sim/ppc/words.h??
- References: <Pine.LNX.4.58.0504181150530.29047@lazy>
On Mon, Apr 18, 2005 at 11:57:48AM -0500, Manoj Iyer wrote:
>
> sim/ppc/words.h has 3 typedefs enclosed in #ifdef __GNUC__, but I dont see
> anything in the typedef that will require this #ifdef.
>
> #ifdef __GNUC__
> typedef long long natural64;
> typedef signed long long signed64;
> typedef unsigned long long unsigned64;
> #endif
>
> The xlc compiler fails to see any other definition of natural64, signed64
> and unsigned64 and reports them as undefined. Is it ok to remove this
> #ifdef ?
>
> I can change #ifdef __GNUC__ to #if, #else statement to accomodate
> _MSC_VER .
If you want to remove the ifdef, you need to find another way to test
whether long long is available. Many C89 compilers do not support it.
--
Daniel Jacobowitz
CodeSourcery, LLC