This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Merge status
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: law at redhat dot com
- Cc: Andreas Jaeger <aj at suse dot de>, Ian Lance Taylor <ian at wasabisystems dot com>, Jason Merrill <jason at redhat dot com>, Diego Novillo <dnovillo at redhat dot com>, Paolo Bonzini <bonzini at gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 17 Mar 2004 14:42:47 +0000 (UTC)
- Subject: Re: [tree-ssa] Merge status
- References: <200403171433.i2HEXb3P006028@speedy.slc.redhat.com>
On Wed, 17 Mar 2004 firstname.lastname@example.org wrote:
> >#define IXDR_GET_LONG(buf) ((long)IXDR_GET_INT32(buf))
> >#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
> >? Solaris 9 uses similar definitions, that expect buf to point to a type
> >of appropriate width (and are only defined if !defined(_LP64)).
> But if you define them in that way you're going to get warnings.
> The *_LONG macros are used by the *_SHORT, *_ENUM, etc macros. And if
> you get warnings you break packages which build with -Werror.
As far as I can tell the _INT32 definitions will not generate warnings;
they just dereference the pointer (to whatever 32-bit type it might be),
increment the pointer and cast the result of the dereference. As the
casts are all explicit there shouldn't even be -Wconversion warnings.
(The _BOOL, _ENUM etc. macros should arguably use the _INT32 versions
directly rather than going via the deprecated _LONG macros, but I don't
think this should make any difference regarding the lack of warnings.)
Joseph S. Myers