Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] s/UINT_MAX/GDB_UINT_MAX/ ?
@ 2004-08-11 22:47 Joel Brobecker
  2004-08-12  1:22 ` Daniel Jacobowitz
  2004-08-12  1:26 ` Andrew Cagney
  0 siblings, 2 replies; 3+ messages in thread
From: Joel Brobecker @ 2004-08-11 22:47 UTC (permalink / raw)
  To: gdb-patches

This is the last entity in config/powerpc/xm-aix4.h. The comment says:

/* UINT_MAX is defined in <sys/limits.h> as a decimal constant (4294967295)
   which is too large to fit in a signed int when it is parsed by the
   compiler, so it issues a diagnostic.  Just undef it here so that we
   use gdb's version in defs.h */
#undef UINT_MAX

So we have a collision between the macro defined by GDB and the macro
defined by the system. For recent enough versions of AIX, I don't think
the values are different, so we could look the other way and just remove
the #undef, and all things should work. But we still have this collision
and I think we should fix it.

So I suggest we do an all-source rename of UINT_MAX et al to GDB_UINT_MAX,
or something like this. Unless the collision was expected (ie we want to
pick the system value when defined)?

-- 
Joel


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

* Re: [RFC] s/UINT_MAX/GDB_UINT_MAX/ ?
  2004-08-11 22:47 [RFC] s/UINT_MAX/GDB_UINT_MAX/ ? Joel Brobecker
@ 2004-08-12  1:22 ` Daniel Jacobowitz
  2004-08-12  1:26 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-08-12  1:22 UTC (permalink / raw)
  To: gdb-patches

On Wed, Aug 11, 2004 at 03:46:40PM -0700, Joel Brobecker wrote:
> This is the last entity in config/powerpc/xm-aix4.h. The comment says:
> 
> /* UINT_MAX is defined in <sys/limits.h> as a decimal constant (4294967295)
>    which is too large to fit in a signed int when it is parsed by the
>    compiler, so it issues a diagnostic.  Just undef it here so that we
>    use gdb's version in defs.h */
> #undef UINT_MAX
> 
> So we have a collision between the macro defined by GDB and the macro
> defined by the system. For recent enough versions of AIX, I don't think
> the values are different, so we could look the other way and just remove
> the #undef, and all things should work. But we still have this collision
> and I think we should fix it.
> 
> So I suggest we do an all-source rename of UINT_MAX et al to GDB_UINT_MAX,
> or something like this. Unless the collision was expected (ie we want to
> pick the system value when defined)?

The latter is correct.  Take a look at the definition, in defs.h.

That's a buggy system... if you want to support it, we should detect it
in autoconf.  Otherwise, I doubt we'll really miss the #undef.

-- 
Daniel Jacobowitz


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

* Re: [RFC] s/UINT_MAX/GDB_UINT_MAX/ ?
  2004-08-11 22:47 [RFC] s/UINT_MAX/GDB_UINT_MAX/ ? Joel Brobecker
  2004-08-12  1:22 ` Daniel Jacobowitz
@ 2004-08-12  1:26 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2004-08-12  1:26 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

> This is the last entity in config/powerpc/xm-aix4.h. The comment says:
> 
> /* UINT_MAX is defined in <sys/limits.h> as a decimal constant (4294967295)
>    which is too large to fit in a signed int when it is parsed by the
>    compiler, so it issues a diagnostic.  Just undef it here so that we
>    use gdb's version in defs.h */
> #undef UINT_MAX
> 
> So we have a collision between the macro defined by GDB and the macro
> defined by the system. For recent enough versions of AIX, I don't think
> the values are different, so we could look the other way and just remove
> the #undef, and all things should work. But we still have this collision
> and I think we should fix it.

Lets drop the #undef.  As you've indicated, recent versions of AIX don't 
have this problem.  If someone steps forward with a not-so-recent 
version, they can fix configure.in.

Andrew



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

end of thread, other threads:[~2004-08-12  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11 22:47 [RFC] s/UINT_MAX/GDB_UINT_MAX/ ? Joel Brobecker
2004-08-12  1:22 ` Daniel Jacobowitz
2004-08-12  1:26 ` Andrew Cagney

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