Software Archive
Read-only legacy content
17061 Discussions

__declspec vs __attribute__

Anwar_Ludin
Beginner
2,127 Views

What's the difference between __declspec and __attribute__ directives when ensuring that a function/variable is visible on the coprocessor? 

0 Kudos
2 Replies
Kevin_D_Intel
Employee
2,127 Views

Nothing.  __attribute__ is Linux syntax; __declspec is the Windows syntax and the only form the Intel C++ compiler for Windows accepts; however, the Intel C/C++ compiler for Linux accepts both.

0 Kudos
Anwar_Ludin
Beginner
2,127 Views

Thanks Kevin!

0 Kudos
Reply