During the makefile execution today, the following error occurred:
error: 'for' loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to compile your code
The reason for this is that GCC is based on the C89 standard at compile time, and the C89 standard does not support circular statements defined as follows:
for(int i=0; i<width; i++)
I in a loop statement is not supported to be defined in a loop statement, so change it to:
int i;
for(i=0; i<width; i++);
Reexecution will not error ~
Read More:
- error: ‘for‘ loop initial declarations are only allowed in C99 mode
- Compiler problem, error: ‘for’ loop initial declarations are only allowed in C99 mode
- [Solved] Dev-C++ [Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode
- How to handle when select single is not allowed in loop
- Module build failed Error Plugin/Preset files are not allowed to export objects, only functions (How to Fix)
- How to Fix RTL8188 “Set Mode” (8B06) Error
- VScode: How to Fix “Comments are not permitted in JSON” issue
- 【.Net Core】using declarations‘ is not available in C# 7.3. Please use language version 8.0 or greate
- warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
- You are not allowed to upload merges in Git push
- UnhandledPromiseRejectionWarning Error: Can‘t set headers after they are sent (How to Fix)
- This application has no explicit mapping for /error, so you are seeing this as a fallback (How to Fix)
- Git push you are not allowed to upload merges
- Fatal error C1853 error occurs when there are mixed .c files in the VS project
- ValueError: Integers to negative integer powers are not allowed.
- How to Fix Parser rerror: error tokenizing data. C error: expected 2 fields in line 53, saw 3
- Docker encountered a problem 4: yaml: Line 1: mapping values are not allowed in this context
- GitLab You are not allowed to push code to this project
- Package pdftex.def Error: PDF mode expected, but DVI mode detected!_ mdpi_ Templatex compilation error in winedt
- Annotations are not allowed here