[ISSUE] WorkBench Intellisense "No Storage Class"


#1

Support Information:

  • VSCode Ver: 1.28.2
  • OS Versison: MacOS High Sierra 10.13.6
    Other Extensiosns
  • C++: 0.19.0
  • Cortex-Debug: 0.1.21
  • Particle Code Snippets: 1.0.0-alpha.3
  • Particle Themes: 1.0.0-alpha.3
  • Particle Workbench 1.0.0-alpha.3

Existing codebase uses “retained” variable declarations with no issues and builds/runs correctly under ParticleDev/Atom environment. Under VSCode environment, codebase builds, flashes and runs correctly. However in the Particle Workbench “Problems” tab, reports “this declaration has no storage class or type specifier” for all “retained” declared variables. Similar problem for “time_t” reports “not a type name”.


#2

Could it be that your build is targeting the Core?
Try to explicitly change the target platform.

This may be a related issue where the platform setting was not correctly applied at build time


#3

I have the same issue, “retained” has no storage class or type specifier … I have the correct target set :

{
    "settings": {
        "extensions.ignoreRecommendations": true,
        "C_Cpp.default.configurationProvider": "particle.particle-vscode-core",
        "files.associations": {
            "*.ino": "cpp"
        },
        "particle.targetDevice": "BCCU_3",
        "particle.firmwareVersion": "0.8.0-rc.10",
        "particle.targetPlatform": "electron"
    },
    "folders": [
        {
            "path": "."
        }
    ]
}

Running Alpha 6, vscode 1.30.2 user version