Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* why use #ifdef __GNUC__ in sim/ppc/words.h??
@ 2005-04-18 16:24 Manoj Iyer
  2005-04-18 16:26 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Manoj Iyer @ 2005-04-18 16:24 UTC (permalink / raw)
  To: gdb


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 .

Thanks
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum                                                          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: why use #ifdef __GNUC__ in sim/ppc/words.h??
  2005-04-18 16:24 why use #ifdef __GNUC__ in sim/ppc/words.h?? Manoj Iyer
@ 2005-04-18 16:26 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-04-18 16:26 UTC (permalink / raw)
  To: Manoj Iyer; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-18 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-18 16:24 why use #ifdef __GNUC__ in sim/ppc/words.h?? Manoj Iyer
2005-04-18 16:26 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox