How portable is __get_cpuid?

2019-06-25 09:33发布

I'm using __get_cpuid() to get info on the x86 and x86_64 processors my programs run on. With GCC on Linux and Mac OS, it seems to compile and run OK without include any header, but how portable is that? Would it work with other compilers? Should I include a header for that?

标签: c portability
1条回答
爷、活的狠高调
2楼-- · 2019-06-25 10:20

It has two leading underscores. Any leading underscore at all is a big hint that the variable or function is not portable.

查看更多
登录 后发表回答