Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 21994

cannot compile using gcc's same_type_p()

$
0
0

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.


Viewing all articles
Browse latest Browse all 21994

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>