Handling non-standard or unsupported keywords: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Many target compilers for specific systems support specialized non-standard keywords. Although the STRIDE compiler supports many of these, from time to time you may run into one that is not supported. This article describes how to handle this. | Many target compilers for specific systems support specialized non-standard keywords. Although the STRIDE compiler supports many of these, from time to time you may run into one that is not supported. This article describes how to handle this. | ||
If an unrecognized keyword in your source file is preventing compilation in STRIDE, you can often work around the issue by | If an unrecognized keyword in your source file is preventing compilation in STRIDE, you can often work around the issue by adding an explicit empty preprocessor definition (ie macro) for the keyword. | ||
For example if your source contains a keyword <tt>__inline__</tt> that is not supported by STRIDE and is preventing successful compilation, then you remedy this by adding the following to the preprocessor definitions. | |||
-D__inline__= | |||
For example if your source contains a keyword <tt>__inline__</tt> that is not supported by STRIDE and is preventing successful compilation, then you remedy this by adding | This line instructs the STRIDE preprocessor to replace occurrence of the keyword with nothing, causing the STRIDE compiler to effectively ignore it. | ||
[[Category:Troubleshooting]] | [[Category:Troubleshooting]] | ||
[[Category:Compiler]] | [[Category:Compiler]] |
Revision as of 17:13, 12 February 2009
Many target compilers for specific systems support specialized non-standard keywords. Although the STRIDE compiler supports many of these, from time to time you may run into one that is not supported. This article describes how to handle this.
If an unrecognized keyword in your source file is preventing compilation in STRIDE, you can often work around the issue by adding an explicit empty preprocessor definition (ie macro) for the keyword.
For example if your source contains a keyword __inline__ that is not supported by STRIDE and is preventing successful compilation, then you remedy this by adding the following to the preprocessor definitions.
-D__inline__=
This line instructs the STRIDE preprocessor to replace occurrence of the keyword with nothing, causing the STRIDE compiler to effectively ignore it.