This is the mail archive of the gcc@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]

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


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