You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
This compiles fine and runs as expected. But inilllisense is confused by the pgm_read_word macro resulting in the following problems being shown. And it breaks things for later lines of code throwing spurious problems that go away if this line is commented out.
{
"resource": "/c:/projects/vscodebug/vscodebug.ino",
"owner": "C/C++",
"code": "254",
"severity": 8,
"message": "type name is not allowed",
"source": "C/C++",
"startLineNumber": 4,
"startColumn": 28,
"endLineNumber": 4,
"endColumn": 41
}
const char string_1[] PROGMEM = "Learn";
void setup(){
char buffer[15]="";
strcpy_P(buffer, (char *)pgm_read_word(&string_1)); // Necessary casts and dereferencing, just copy.
}
void loop() {
}
This compiles fine and runs as expected. But inilllisense is confused by the pgm_read_word macro resulting in the following problems being shown. And it breaks things for later lines of code throwing spurious problems that go away if this line is commented out.
{
"resource": "/c:/projects/vscodebug/vscodebug.ino",
"owner": "C/C++",
"code": "254",
"severity": 8,
"message": "type name is not allowed",
"source": "C/C++",
"startLineNumber": 4,
"startColumn": 28,
"endLineNumber": 4,
"endColumn": 41
}
{
"resource": "/c:/projects/vscodebug/vscodebug.ino",
"owner": "C/C++",
"code": "169",
"severity": 8,
"message": "expected a declaration",
"source": "C/C++",
"startLineNumber": 5,
"startColumn": 1,
"endLineNumber": 5,
"endColumn": 2
}
The text was updated successfully, but these errors were encountered: