Based on this gcc doc [https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gccint/Types.html#Types], I'm tring to use same_type_p() to compare the type of 2 variables:
#include <stdio.h>
int main (void)
{
int a, b;
if (same_type_p(a, b))
printf("OK\n");
exit (0);
}
Compilation failed with the following message:
error: ‘same_type_p’ was not declared in this scope if (same_type_p(a, b)) ^~~~~~~~~~~
I didn't find any example of same_type_p() use. It's used many times in gcc sources but it seems that it's not exported.