This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Merge status


On Wed, 17 Mar 2004 law@redhat.com 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
jsm@polyomino.org.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]