BUGFIX: TORTURE.C - Fixes to allow builds with Compaq C
john.aldridge at informatix.co.uk
Tue Jul 10 16:54:30 GMT 2001
At 12:30 10/07/2001 -0400, Michael Sweet wrote:
>John Aldridge wrote:
> > ...
> > No... it's an error. ANSI C says (under Assignment)
> > "One of the following shall hold... both operands are pointers to qualified
> > or unqualified versions of compatible types, and the type pointed to by the
> > left hand side has all the qualifiers of the type pointed to by the right."
> > and then defines argument passing to be "as if by assignment".
>Sigh... You might also look to see that "signed" and "unsigned" types
>are considered to be compatible for assignment purposes, although a
>compiler is free to issue a warning about it...
The section on assignment also says "One of the following shall hold... the
left operand has qualified or unqualifed arithmetic type and the right has
arithmetic type." which covers this case
In other words
signed = unsigned
is legal (though the compiler may warn), but
int* = volatile int*
isn't, and the compiler must issue a diagnostic and need complete the
More information about the samba-technical