This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
rfc: __builtin_types_compatible_p and unsigned literals
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 6 May 2002 13:47:29 +1000
- Subject: rfc: __builtin_types_compatible_p and unsigned literals
hi guys.
we all agree, this should return true:
__builtin_types_compatible_p (unsigned int, 31U)
but how about this:
__builtin_types_compatible_p (unsigned int, 31) /* signed literal */
this last one currently returns false, but in the spirit of C, i think
it should return true.
for example,
int foo (unsigned int blah) { }
accepts foo(31) as well as foo(31U).
can i "fix" __builtin_types_compatible_p?
aldy