How portable is __get_cpuid?

为君一笑 提交于 2019-12-07 04:10:37

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/8407001/how-portable-is-get-cpuid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!