ARMCC: Error #268: declaration may not appear after executable state
Information in this knowledgebase article applies to:
While compiling a module, this error message displays:
Error: #268: declaration may not appear after executable statement in block
Keil C compilers are based on ANSI C C90 standard, but are expanded with added language extensions, practical concessions to the architectural peculiarities of the microcontrollers, and other features that meet the needs of embedded systems programmers.
In C90, all variable declarations must happen before any executable statements in a function or other code block. The compiler error message mentions the line number of the offending line of code.
Last Reviewed: Tuesday, September 27, 2016
of your data.