I know that #pragmas
are compiler directives which are used to provide additional information to the compiler. My question is that, I need to write some #pragmas
for my project. i.e, I need to invoke some particular code when there are some particular pattern in code. Can some one throw light on this?
You can't write your own #pragma
s. You must look into your compiler's handbook for which #pragma
s are supported.
Alternatively, if your compiler allows you to modify its source code (license- and sourcecode-wise), you might hack some new ones in. Don't expect it to be a trivial task, there's usually no enduser-friendly plug-in write-your-own-pragmas system.